linux/arch/powerpc
Nathan Fontenot f755ecfb8c powerpc/pseries: Correct string length in pseries_of_derive_parent()
Commit a030e1e4bb 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: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-10-28 12:08:18 +09:00
..
boot powerpc/ps3: Quieten boot wrapper output with run_cmd 2015-10-21 20:06:56 +11:00
configs powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU 2015-10-19 19:51:18 +11:00
crypto crypto: powerpc/md5 - use md5 IV MD5_HX instead of their raw value 2015-05-18 12:20:20 +08:00
include powerpc: Individual System V IPC system calls 2015-10-15 20:31:57 +11:00
kernel powerpc/eeh: More relaxed condition for enabled IO path 2015-10-21 20:41:43 +11:00
kvm powerpc/mm: Differentiate between hugetlb and THP during page walk 2015-10-12 15:30:09 +11:00
lib powerpc32: memset: only use dcbz once cache is enabled 2015-09-17 10:36:53 +10:00
math-emu
mm powerpc/numa: Use of_get_next_parent to simplify code 2015-10-15 20:32:00 +11:00
net ppc: bpf: Add SKF_AD_CPU for ppc32 2015-02-20 15:19:43 -05:00
oprofile powerpc: Remove mtmsrd(), use existing mtmsr() 2015-07-13 15:47:28 +10:00
perf powerpc/mm: Differentiate between hugetlb and THP during page walk 2015-10-12 15:30:09 +11:00
platforms powerpc/pseries: Correct string length in pseries_of_derive_parent() 2015-10-28 12:08:18 +09:00
sysdev powerpc/mpc5xxx: Use of_get_next_parent to simplify code 2015-10-15 20:32:01 +11:00
xmon powerpc/xmon: Add some more elements to the existing PACA dump list 2015-10-15 20:32:02 +11:00
Kconfig kexec: split kexec_load syscall from kexec core code 2015-09-10 13:29:01 -07:00
Kconfig.debug powerpc: Make STRICT_MM_TYPECHECKS a config option 2015-05-11 19:53:59 +10:00
Makefile powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU 2015-10-19 19:51:18 +11:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00