aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-23 18:02:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:41 -0400
commit9d944ef32e83405a07376f112e9f02161d3e9731 (patch)
tree24170ff64fb83221da133e2afb53f58e840a6eee /kernel/kmod.c
parentd0bd587a80960d7ba7e0c8396e154028c9045c54 (diff)
usermodehelper: kill umh_wait, renumber UMH_* constants
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>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r--kernel/kmod.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index f92f917c450c..8341de91613f 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -257,12 +257,9 @@ static void __call_usermodehelper(struct work_struct *work)
257{ 257{
258 struct subprocess_info *sub_info = 258 struct subprocess_info *sub_info =
259 container_of(work, struct subprocess_info, work); 259 container_of(work, struct subprocess_info, work);
260 enum umh_wait wait = sub_info->wait; 260 int wait = sub_info->wait & ~UMH_KILLABLE;
261 pid_t pid; 261 pid_t pid;
262 262
263 if (wait != UMH_NO_WAIT)
264 wait &= ~UMH_KILLABLE;
265
266 /* CLONE_VFORK: wait until the usermode helper has execve'd 263 /* CLONE_VFORK: wait until the usermode helper has execve'd
267 * successfully We need the data structures to stay around 264 * successfully We need the data structures to stay around
268 * until that is done. */ 265 * until that is done. */
@@ -451,8 +448,7 @@ EXPORT_SYMBOL(call_usermodehelper_setfns);
451 * asynchronously if wait is not set, and runs as a child of keventd. 448 * asynchronously if wait is not set, and runs as a child of keventd.
452 * (ie. it runs with full root capabilities). 449 * (ie. it runs with full root capabilities).
453 */ 450 */
454int call_usermodehelper_exec(struct subprocess_info *sub_info, 451int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
455 enum umh_wait wait)
456{ 452{
457 DECLARE_COMPLETION_ONSTACK(done); 453 DECLARE_COMPLETION_ONSTACK(done);
458 int retval = 0; 454 int retval = 0;