Re: [PATCH 6/6] kernel: add a kernel_wait helper

2020-06-20 Thread Luis Chamberlain
On Sat, Jun 20, 2020 at 08:35:38AM +0200, Christoph Hellwig wrote: > On Fri, Jun 19, 2020 at 09:17:00PM +, Luis Chamberlain wrote: > > On Thu, Jun 18, 2020 at 04:46:27PM +0200, Christoph Hellwig wrote: > > > --- a/kernel/exit.c > > > +++ b/kernel/exit.c > > > @@ -1626,6 +1626,22 @@ long kernel_

Re: [PATCH 6/6] kernel: add a kernel_wait helper

2020-06-19 Thread Christoph Hellwig
On Fri, Jun 19, 2020 at 09:17:00PM +, Luis Chamberlain wrote: > On Thu, Jun 18, 2020 at 04:46:27PM +0200, Christoph Hellwig wrote: > > --- a/kernel/exit.c > > +++ b/kernel/exit.c > > @@ -1626,6 +1626,22 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, > > int options, > > return ret

Re: [PATCH 6/6] kernel: add a kernel_wait helper

2020-06-19 Thread Luis Chamberlain
On Thu, Jun 18, 2020 at 04:46:27PM +0200, Christoph Hellwig wrote: > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1626,6 +1626,22 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, > int options, > return ret; > } > > +int kernel_wait(pid_t pid, int *stat) > +{ > + struct wait

[PATCH 6/6] kernel: add a kernel_wait helper

2020-06-18 Thread Christoph Hellwig
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 --- include/linu

[PATCH 6/6] kernel: add a kernel_wait helper

2020-06-15 Thread Christoph Hellwig
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 --- include/linu