diff options
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r-- | kernel/kmod.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 7efba6f8e3ec..48daed4c51ba 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -175,16 +175,16 @@ static int wait_for_helper(void *data) | |||
175 | struct subprocess_info *sub_info = data; | 175 | struct subprocess_info *sub_info = data; |
176 | pid_t pid; | 176 | pid_t pid; |
177 | 177 | ||
178 | /* Install a handler: if SIGCLD isn't handled sys_wait4 won't | 178 | /* If SIGCLD is ignored sys_wait4 won't populate the status. */ |
179 | * populate the status, but will return -ECHILD. */ | 179 | spin_lock_irq(¤t->sighand->siglock); |
180 | allow_signal(SIGCHLD); | 180 | current->sighand->action[SIGCHLD-1].sa.sa_handler = SIG_DFL; |
181 | spin_unlock_irq(¤t->sighand->siglock); | ||
181 | 182 | ||
182 | pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD); | 183 | pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD); |
183 | if (pid < 0) { | 184 | if (pid < 0) { |
184 | sub_info->retval = pid; | 185 | sub_info->retval = pid; |
185 | } else { | 186 | } else { |
186 | int ret; | 187 | int ret = -ECHILD; |
187 | |||
188 | /* | 188 | /* |
189 | * Normally it is bogus to call wait4() from in-kernel because | 189 | * Normally it is bogus to call wait4() from in-kernel because |
190 | * wait4() wants to write the exit code to a userspace address. | 190 | * wait4() wants to write the exit code to a userspace address. |