summaryrefslogtreecommitdiff
path: root/fs/proc/nommu.c
diff options
context:
space:
mode:
authorDmitry Adamushko <dmitry.adamushko@gmail.com>2012-03-22 21:39:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-02 09:27:17 -0700
commit6986f38042842b6c43dd10c36311db66c2865367 (patch)
treef50a8f39ff58d01ec1edf09a4bf760e5579a86e9 /fs/proc/nommu.c
parentd6dbbeccac70f85972e8b7773cede113914c9730 (diff)
downloadlwn-6986f38042842b6c43dd10c36311db66c2865367.tar.gz
lwn-6986f38042842b6c43dd10c36311db66c2865367.zip
x86-32: Fix endless loop when processing signals for kernel tasks
commit 29a2e2836ff9ea65a603c89df217f4198973a74f upstream. The problem occurs on !CONFIG_VM86 kernels [1] when a kernel-mode task returns from a system call with a pending signal. A real-life scenario is a child of 'khelper' returning from a failed kernel_execve() in ____call_usermodehelper() [ kernel/kmod.c ]. kernel_execve() fails due to a pending SIGKILL, which is the result of "kill -9 -1" (at least, busybox's init does it upon reboot). The loop is as follows: * syscall_exit_work: - work_pending: // start_of_the_loop - work_notify_sig: - do_notify_resume() - do_signal() - if (!user_mode(regs)) return; - resume_userspace // TIF_SIGPENDING is still set - work_pending // so we call work_pending => goto // start_of_the_loop More information can be found in another LKML thread: http://www.serverphorums.com/read.php?12,457826 [1] the problem was also seen on MIPS. Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com> Link: http://lkml.kernel.org/r/1332448765.2299.68.camel@dimm Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@hack.frob.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc/nommu.c')
0 files changed, 0 insertions, 0 deletions