Skip to content

Commit fb45550

Browse files
author
Al Viro
committed
make sure that kernel_thread() callbacks call do_exit() themselves
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>
1 parent d6b2123 commit fb45550

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/kmod.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static int ____call_usermodehelper(void *data)
225225
/* Exec failed? */
226226
fail:
227227
sub_info->retval = retval;
228-
return 0;
228+
do_exit(0);
229229
}
230230

231231
static int call_helper(void *data)
@@ -292,7 +292,7 @@ static int wait_for_helper(void *data)
292292
}
293293

294294
umh_complete(sub_info);
295-
return 0;
295+
do_exit(0);
296296
}
297297

298298
/* This is run by khelper thread */

0 commit comments

Comments
 (0)