Re: [RFC PATCH 3/3] exec: do unshare_files after de_thread

2018-08-28 Thread Jeff Layton
On Mon, 2018-08-27 at 13:47 -0400, Jeff Layton wrote: > POSIX mandates that open fds and their associated file locks should be > preserved across an execve. This works, unless the process is > multithreaded at the time that execve is called. > > In that case, we'll end up unsharing the

Re: [RFC PATCH 3/3] exec: do unshare_files after de_thread

2018-08-28 Thread Jeff Layton
On Mon, 2018-08-27 at 13:47 -0400, Jeff Layton wrote: > POSIX mandates that open fds and their associated file locks should be > preserved across an execve. This works, unless the process is > multithreaded at the time that execve is called. > > In that case, we'll end up unsharing the

[RFC PATCH 3/3] exec: do unshare_files after de_thread

2018-08-27 Thread Jeff Layton
POSIX mandates that open fds and their associated file locks should be preserved across an execve. This works, unless the process is multithreaded at the time that execve is called. In that case, we'll end up unsharing the files_struct but the locks will still have their fl_owner set to the

[RFC PATCH 3/3] exec: do unshare_files after de_thread

2018-08-27 Thread Jeff Layton
POSIX mandates that open fds and their associated file locks should be preserved across an execve. This works, unless the process is multithreaded at the time that execve is called. In that case, we'll end up unsharing the files_struct but the locks will still have their fl_owner set to the