1. 21 10月, 2015 1 次提交
    • C
      powerpc/prom: Avoid reference to potentially freed memory · 1856f50c
      Christophe Jaillet 提交于
      of_get_property() is used inside the loop, but then the reference to the
      node is dropped before dereferencing the prop pointer, which could by then
      point to junk if the node has been freed.
      
      Instead use of_property_read_u32() to actually read the property
      value before dropping the reference.
      
      of_property_read_u32() requires at least one cell (u32) to be present,
      which is stricter than the old logic which would happily dereference a
      property of any size. However we believe all device trees in the wild
      have at least one cell.
      
      Skiboot may produce memory nodes with more than one cell, but that is
      OK, of_property_read_u32() will return the first one.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      [mpe: Expand change log with device tree details]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1856f50c
  2. 19 10月, 2015 2 次提交
  3. 15 10月, 2015 20 次提交
  4. 12 10月, 2015 2 次提交
  5. 09 10月, 2015 2 次提交
  6. 06 10月, 2015 2 次提交
  7. 05 10月, 2015 6 次提交
  8. 02 10月, 2015 3 次提交
  9. 01 10月, 2015 2 次提交