Skip to content

Commit

Permalink
make sure that kernel_thread() callbacks call do_exit() themselves
Browse files Browse the repository at this point in the history
Most of them never returned anyway - only two functions had to be
changed.  That allows to simplify their callers a whole lot.

Note that this does *not* apply to kthread_run() callbacks - all of
those had been called from the same kernel_thread() callback, which
did do_exit() already.  This is strictly about very few low-level
kernel_thread() callbacks (there are only 6 of those, mostly as part
of kthread.h and kmod.h exported mechanisms, plus kernel_init()
itself).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 12, 2012
1 parent d6b2123 commit fb45550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int ____call_usermodehelper(void *data)
/* Exec failed? */
fail:
sub_info->retval = retval;
return 0;
do_exit(0);
}

static int call_helper(void *data)
Expand Down Expand Up @@ -292,7 +292,7 @@ static int wait_for_helper(void *data)
}

umh_complete(sub_info);
return 0;
do_exit(0);
}

/* This is run by khelper thread */
Expand Down

0 comments on commit fb45550

Please sign in to comment.