diff options
| author | Christoph Hellwig <[email protected]> | 2020-08-11 18:34:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-08-12 10:57:59 -0700 |
| commit | 8043fc147a97ec2eefc582487f344f2cbe86d12e (patch) | |
| tree | 05be60738ff9974830290aa6a4459336ecdd45d9 /include/linux | |
| parent | f48ff83e9c1a8fc2e8bfedb4855933eb1ed159b2 (diff) | |
kernel: add a kernel_wait helper
Add a helper that waits for a pid and stores the status in the passed in
kernel pointer. Use it to fix the usage of kernel_wait4 in
call_usermodehelper_exec_sync that only happens to work due to the
implicit set_fs(KERNEL_DS) for kernel threads.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: "Eric W. Biederman" <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched/task.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h index ae3060f0b0c9..a98965007eef 100644 --- a/include/linux/sched/task.h +++ b/include/linux/sched/task.h @@ -88,6 +88,7 @@ struct task_struct *fork_idle(int); struct mm_struct *copy_init_mm(void); extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); extern long kernel_wait4(pid_t, int __user *, int, struct rusage *); +int kernel_wait(pid_t pid, int *stat); extern void free_task(struct task_struct *tsk); |