summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/icswx.c
diff options
context:
space:
mode:
authorNathan Fontenot2015-10-27 16:46:47 +0100
committerMichael Ellerman2015-10-28 04:08:18 +0100
commitf755ecfb8cec7b19dff84295309f2afb24a5afd1 (patch)
tree0786fec1e825368514b8db02c53ab31acb66505b /arch/powerpc/mm/icswx.c
parentpowerpc/eeh: Fix recursive fenced PHB on Broadcom shiner adapter (diff)
downloadkernel-qcow2-linux-f755ecfb8cec7b19dff84295309f2afb24a5afd1.tar.gz
kernel-qcow2-linux-f755ecfb8cec7b19dff84295309f2afb24a5afd1.tar.xz
kernel-qcow2-linux-f755ecfb8cec7b19dff84295309f2afb24a5afd1.zip
powerpc/pseries: Correct string length in pseries_of_derive_parent()
Commit a030e1e4bbd085bbcfd0a23f8d355fcd41f39bed 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>
Diffstat (limited to 'arch/powerpc/mm/icswx.c')
0 files changed, 0 insertions, 0 deletions