diff options
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r-- | kernel/kmod.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 6f99aead66c6..1c317e386831 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/notifier.h> | 37 | #include <linux/notifier.h> |
38 | #include <linux/suspend.h> | 38 | #include <linux/suspend.h> |
39 | #include <linux/rwsem.h> | 39 | #include <linux/rwsem.h> |
40 | #include <linux/ptrace.h> | ||
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
41 | 42 | ||
42 | #include <trace/events/module.h> | 43 | #include <trace/events/module.h> |
@@ -221,11 +222,13 @@ static int ____call_usermodehelper(void *data) | |||
221 | retval = kernel_execve(sub_info->path, | 222 | retval = kernel_execve(sub_info->path, |
222 | (const char *const *)sub_info->argv, | 223 | (const char *const *)sub_info->argv, |
223 | (const char *const *)sub_info->envp); | 224 | (const char *const *)sub_info->envp); |
225 | if (!retval) | ||
226 | return 0; | ||
224 | 227 | ||
225 | /* Exec failed? */ | 228 | /* Exec failed? */ |
226 | fail: | 229 | fail: |
227 | sub_info->retval = retval; | 230 | sub_info->retval = retval; |
228 | return 0; | 231 | do_exit(0); |
229 | } | 232 | } |
230 | 233 | ||
231 | static int call_helper(void *data) | 234 | static int call_helper(void *data) |
@@ -292,7 +295,7 @@ static int wait_for_helper(void *data) | |||
292 | } | 295 | } |
293 | 296 | ||
294 | umh_complete(sub_info); | 297 | umh_complete(sub_info); |
295 | return 0; | 298 | do_exit(0); |
296 | } | 299 | } |
297 | 300 | ||
298 | /* This is run by khelper thread */ | 301 | /* This is run by khelper thread */ |