1. 15 9月, 2016 1 次提交
  2. 16 8月, 2016 1 次提交
  3. 10 8月, 2016 1 次提交
  4. 20 7月, 2016 1 次提交
  5. 19 7月, 2016 1 次提交
  6. 25 6月, 2016 1 次提交
    • F
      of: fix memory leak related to safe_name() · d9fc8807
      Frank Rowand 提交于
      Fix a memory leak resulting from memory allocation in safe_name().
      This patch fixes all call sites of safe_name().
      
      Mathieu Malaterre reported the memory leak on boot:
      
      On my PowerMac device-tree would generate a duplicate name:
      
      [    0.023043] device-tree: Duplicate name in PowerPC,G4@0, renamed to "l2-cache#1"
      
      in this case a newly allocated name is generated by `safe_name`. However
      in this case it is never deallocated.
      
      The bug was found using kmemleak reported as:
      
      unreferenced object 0xdf532e60 (size 32):
        comm "swapper", pid 1, jiffies 4294892300 (age 1993.532s)
        hex dump (first 32 bytes):
          6c 32 2d 63 61 63 68 65 23 31 00 dd e4 dd 1e c2  l2-cache#1......
          ec d4 ba ce 04 ec cc de 8e 85 e9 ca c4 ec cc 9e  ................
        backtrace:
          [<c02d3350>] kvasprintf+0x64/0xc8
          [<c02d3400>] kasprintf+0x4c/0x5c
          [<c0453814>] safe_name.isra.1+0x80/0xc4
          [<c04545d8>] __of_attach_node_sysfs+0x6c/0x11c
          [<c075f21c>] of_core_init+0x8c/0xf8
          [<c0729594>] kernel_init_freeable+0xd4/0x208
          [<c00047e8>] kernel_init+0x24/0x11c
          [<c00158ec>] ret_from_kernel_thread+0x5c/0x64
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=120331Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com>
      Reported-by: mathieu.malaterre@gmail.com
      Tested-by: NMathieu Malaterre <mathieu.malaterre@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRob Herring <robh@kernel.org>
      d9fc8807
  7. 11 5月, 2016 1 次提交
    • S
      drivers/of: Add check for null property in of_remove_property() · 201b3fe5
      Suraj Jitindar Singh 提交于
      The validity of the property input argument to of_remove_property() is
      never checked within the function and thus it is possible to pass a null
      value. It happens that this will be picked up in __of_remove_property()
      as no matching property of the device node will be found and thus an
      error will be returned, however once again there is no explicit check
      for a null value. By the time this is detected 2 locks have already been
      acquired which is completely unnecessary if the property to remove is
      null.
      
      Add an explicit check in the function of_remove_property() for a null
      property value and return -ENODEV in this case, this is consistent with
      what the previous return value would have been when the null value was
      not detected and passed to __of_remove_property().
      
      By moving an explicit check for the property paramenter into the
      of_remove_property() function, this will remove the need to perform this
      check in calling code before invocation of the of_remove_property()
      function.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      201b3fe5
  8. 25 4月, 2016 1 次提交
  9. 20 4月, 2016 5 次提交
  10. 04 3月, 2016 1 次提交
  11. 31 10月, 2015 1 次提交
  12. 23 6月, 2015 1 次提交
  13. 22 6月, 2015 1 次提交
  14. 04 6月, 2015 1 次提交
  15. 27 5月, 2015 1 次提交
  16. 25 5月, 2015 1 次提交
  17. 17 4月, 2015 1 次提交
  18. 15 4月, 2015 1 次提交
    • K
      of: Add helper function to check MMIO register endianness · 37786c7f
      Kevin Cernekee 提交于
      SoC peripherals can come in several different flavors:
      
       - little-endian: registers always need to be accessed in LE mode (so the
         kernel should perform a swap if the CPU is running BE)
      
       - big-endian: registers always need to be accessed in BE mode (so the
         kernel should perform a swap if the CPU is running LE)
      
       - native-endian: the bus will automatically swap accesses, so the kernel
         should never swap
      
      Introduce a function that checks an OF device node to see whether it
      contains a "big-endian" or "native-endian" property.  For the former case,
      always return true.  For the latter case, return true iff the kernel was
      built for BE (implying that the BE MMIO accessors do not perform a swap).
      Otherwise return false, assuming LE registers.
      
      LE registers are assumed by default because most existing drivers (libahci,
      serial8250, usb) always use readl/writel in the absence of instructions
      to the contrary, so that will be our fallback.
      Signed-off-by: NKevin Cernekee <cernekee@gmail.com>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      37786c7f
  19. 19 3月, 2015 2 次提交
  20. 18 3月, 2015 1 次提交
  21. 10 3月, 2015 2 次提交
  22. 23 2月, 2015 2 次提交
  23. 04 2月, 2015 1 次提交
  24. 04 12月, 2014 2 次提交
  25. 28 11月, 2014 1 次提交
  26. 19 11月, 2014 2 次提交
  27. 05 11月, 2014 5 次提交