lkml.org 
[lkml]   [2020]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pidfd: Stop taking cred_guard_mutex
On Tue, Mar 10, 2020 at 01:52:05PM -0500, Eric W. Biederman wrote:
>
> During exec some file descriptors are closed and the files struct is
> unshared. But all of that can happen at other times and it has the
> same protections during exec as at ordinary times. So stop taking the
> cred_guard_mutex as it is useless.
>
> Furthermore he cred_guard_mutex is a bad idea because it is deadlock
> prone, as it is held in serveral while waiting possibly indefinitely
> for userspace to do something.
>
> Cc: Sargun Dhillon <sargun@sargun.me>
> Cc: Christian Brauner <christian.brauner@ubuntu.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Fixes: 8649c322f75c ("pid: Implement pidfd_getfd syscall")
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---
> kernel/pid.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> Christian if you don't have any objections I will take this one through
> my tree.

Sure.
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

>
> I tried to figure out why this code path takes the cred_guard_mutex and
> the archive on lore.kernel.org was not helpful in finding that part of
> the conversation.

Let me think a little harder and hopefully get back to you with a
sensible explanation.

\
 
 \ /
  Last update: 2020-03-10 20:16    [W:0.513 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site