[PATCH] sys_getppid oopses on debug kernel
[PATCH] sys_getppid oopses on debug kernel

sys_getppid() optimization can access a freed memory.  On kernels with
DEBUG_SLAB turned ON, this results in Oops.  As Dave Hansen noted, this
optimization is also unsafe for memory hotplug.

So this patch always takes the lock to be safe.

[20b70f0af00562e63758b9ee42012ecc96c58590@tv-sign.ru: simplifications]
Signed-off-by: Kirill Korotaev <34c6fceca75e456f25e7e99531e2425c6c1de443@openvz.org>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org>
Cc: Dave Hansen <e169c2064f54e292652f83bb35eed10e1aa33f38@us.ibm.com>
Signed-off-by: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@tv-sign.ru>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs