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).
Unified · Split
| @@ -225,7 +225,7 @@ static int ____call_usermodehelper(void *data) · 224 unmodified lines | |||
| 225 | /* Exec failed? */ | 225 | /* Exec failed? */ |
| 226 | fail: | 226 | fail: |
| 227 | sub_info->retval = retval; | 227 | sub_info->retval = retval; |
| 228 | return 0; | 228 | do_exit(0); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | static int call_helper(void *data) | 231 | static int call_helper(void *data) |
| @@ -292,7 +292,7 @@ static int wait_for_helper(void *data) · 60 unmodified lines | |||
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | umh_complete(sub_info); | 294 | umh_complete(sub_info); |
| 295 | return 0; | 295 | do_exit(0); |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | /* This is run by khelper thread */ | 298 | /* This is run by khelper thread */ |