Re: [PATCH -next] fork.c: Move check of clone NEWIPC and SYSVSEM to copy_process

2017-12-01 Thread Michal Hocko
On Wed 29-11-17 22:33:43, Marcos Paulo de Souza wrote: > On Thu, Nov 30, 2017 at 11:04:06AM +0100, Michal Hocko wrote: > > CC Eric > > > > On Sun 26-11-17 14:06:52, Marcos Paulo de Souza wrote: > > > Currently this check for CLONE_NEWIPC with CLONE_SYSVSEM is done inside > > > copy_namespaces, res

Re: [PATCH -next] fork.c: Move check of clone NEWIPC and SYSVSEM to copy_process

2017-11-30 Thread Marcos Paulo de Souza
On Thu, Nov 30, 2017 at 11:04:06AM +0100, Michal Hocko wrote: > CC Eric > > On Sun 26-11-17 14:06:52, Marcos Paulo de Souza wrote: > > Currently this check for CLONE_NEWIPC with CLONE_SYSVSEM is done inside > > copy_namespaces, resulting in a handful of error paths being executed if > > these flag

Re: [PATCH -next] fork.c: Move check of clone NEWIPC and SYSVSEM to copy_process

2017-11-30 Thread Michal Hocko
CC Eric On Sun 26-11-17 14:06:52, Marcos Paulo de Souza wrote: > Currently this check for CLONE_NEWIPC with CLONE_SYSVSEM is done inside > copy_namespaces, resulting in a handful of error paths being executed if > these flags were used together. So, move this check to the beginning of > copy_proce

[PATCH -next] fork.c: Move check of clone NEWIPC and SYSVSEM to copy_process

2017-11-26 Thread Marcos Paulo de Souza
Currently this check for CLONE_NEWIPC with CLONE_SYSVSEM is done inside copy_namespaces, resulting in a handful of error paths being executed if these flags were used together. So, move this check to the beginning of copy_process, exiting earlier if the condition is true. This move is safe because