From 7b8727432a26fc316f74bc33fc6171f12b703a2c Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 26 May 2010 14:43:03 -0700 Subject: [PATCH] --- yaml --- r: 198741 b: refs/heads/master c: 7d64224217b53b23243fd2aa428001486f2a5da5 h: refs/heads/master i: 198739: 6464a234393a590d1b5f6bb5966860c30e137b17 v: v3 --- [refs] | 2 +- trunk/kernel/kmod.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 6bff4787477a..4940499e41a6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 363da4022c2753bf4b4b54a1bb9e4527fdcb9d5d +refs/heads/master: 7d64224217b53b23243fd2aa428001486f2a5da5 diff --git a/trunk/kernel/kmod.c b/trunk/kernel/kmod.c index 7efba6f8e3ec..48daed4c51ba 100644 --- a/trunk/kernel/kmod.c +++ b/trunk/kernel/kmod.c @@ -175,16 +175,16 @@ static int wait_for_helper(void *data) struct subprocess_info *sub_info = data; pid_t pid; - /* Install a handler: if SIGCLD isn't handled sys_wait4 won't - * populate the status, but will return -ECHILD. */ - allow_signal(SIGCHLD); + /* If SIGCLD is ignored sys_wait4 won't populate the status. */ + spin_lock_irq(¤t->sighand->siglock); + current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL; + spin_unlock_irq(¤t->sighand->siglock); pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD); if (pid < 0) { sub_info->retval = pid; } else { - int ret; - + int ret = -ECHILD; /* * Normally it is bogus to call wait4() from in-kernel because * wait4() wants to write the exit code to a userspace address.