]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
signals: change wait_for_helper() to use kernel_sigaction()
authorOleg Nesterov <oleg@redhat.com>
Thu, 22 May 2014 00:44:04 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:44:04 +0000 (10:44 +1000)
Now that we have kernel_sigaction() we can change wait_for_helper() to use
it and cleans up the code a bit.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/kmod.c

index 6b375af4958d1290c5c7a066903203802ee41d77..c18c891766b56516e6e230b1a82793156c8f9658 100644 (file)
@@ -285,10 +285,7 @@ static int wait_for_helper(void *data)
        pid_t pid;
 
        /* If SIGCLD is ignored sys_wait4 won't populate the status. */
-       spin_lock_irq(&current->sighand->siglock);
-       current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL;
-       spin_unlock_irq(&current->sighand->siglock);
-
+       kernel_sigaction(SIGCHLD, SIG_DFL);
        pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD);
        if (pid < 0) {
                sub_info->retval = pid;