diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2012-03-23 18:02:48 -0400 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2012-04-05 11:17:14 -0400 |
| commit | 322f5cfdfdcf001f8e9f53a6342ead60e9a6d077 (patch) | |
| tree | 7da07e8d7244d4f72f9d7f896477ace06b121eb7 /kernel | |
| parent | de7db9c247875ac10d4d27da70c668109e0108cf (diff) | |
usermodehelper: kill umh_wait, renumber UMH_* constants
BugLink: http://bugs.launchpad.net/bugs/963685
No functional changes. It is not sane to use UMH_KILLABLE with enum
umh_wait, but obviously we do not want another argument in
call_usermodehelper_* helpers. Kill this enum, use the plain int.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 9d944ef32e83405a07376f112e9f02161d3e9731)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/kmod.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 4f895556d7b..8a65e7886f4 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
| @@ -255,12 +255,9 @@ static void __call_usermodehelper(struct work_struct *work) | |||
| 255 | { | 255 | { |
| 256 | struct subprocess_info *sub_info = | 256 | struct subprocess_info *sub_info = |
| 257 | container_of(work, struct subprocess_info, work); | 257 | container_of(work, struct subprocess_info, work); |
| 258 | enum umh_wait wait = sub_info->wait; | 258 | int wait = sub_info->wait & ~UMH_KILLABLE; |
| 259 | pid_t pid; | 259 | pid_t pid; |
| 260 | 260 | ||
| 261 | if (wait != UMH_NO_WAIT) | ||
| 262 | wait &= ~UMH_KILLABLE; | ||
| 263 | |||
| 264 | /* CLONE_VFORK: wait until the usermode helper has execve'd | 261 | /* CLONE_VFORK: wait until the usermode helper has execve'd |
| 265 | * successfully We need the data structures to stay around | 262 | * successfully We need the data structures to stay around |
| 266 | * until that is done. */ | 263 | * until that is done. */ |
| @@ -430,8 +427,7 @@ EXPORT_SYMBOL(call_usermodehelper_setfns); | |||
| 430 | * asynchronously if wait is not set, and runs as a child of keventd. | 427 | * asynchronously if wait is not set, and runs as a child of keventd. |
| 431 | * (ie. it runs with full root capabilities). | 428 | * (ie. it runs with full root capabilities). |
| 432 | */ | 429 | */ |
| 433 | int call_usermodehelper_exec(struct subprocess_info *sub_info, | 430 | int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) |
| 434 | enum umh_wait wait) | ||
| 435 | { | 431 | { |
| 436 | DECLARE_COMPLETION_ONSTACK(done); | 432 | DECLARE_COMPLETION_ONSTACK(done); |
| 437 | int retval = 0; | 433 | int retval = 0; |
