1. 28 10月, 2015 1 次提交
    • N
      powerpc/pseries: Correct string length in pseries_of_derive_parent() · f755ecfb
      Nathan Fontenot 提交于
      Commit a030e1e4 make a change to use
      kstrndup() instead of kmalloc() + strlcpy() in the pseries_of_derive_parent()
      routine that introduces a subtle change in the parent path name generated.
      The kstrndup() routine will copy n characters followed by a terminating null,
      whereas strlcpy() will copy n-1 characters and add a terminating null.
      
      This slight difference results in having a parent path that includes the
      tailing '/' character, "/cpus/" vs. "/cpus". This then causes the subsequent
      call to of_find_node_by_path() to fail, and in the case of DLPAR add
      operations the DLPAR request fails.
      
      This patch decrements the pointer returned from kbasename() to point to the
      '/' character before the base name instead of the base name. This then
      adjusts the string length calculations to not include the trailing '/'
      in the parent path name.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f755ecfb
  2. 21 10月, 2015 11 次提交
  3. 19 10月, 2015 2 次提交
  4. 15 10月, 2015 20 次提交
  5. 12 10月, 2015 2 次提交
  6. 09 10月, 2015 2 次提交
  7. 06 10月, 2015 2 次提交