lkml.org 
[lkml]   [2023]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pid: allow pidfds for reaped tasks
As I said, I am not sure I understand the problem. And I know nothing
about net/ but...

On 08/07, Christian Brauner wrote:
>
> > SO_PEERPIDFD returns `EINVAL` if the peer-task was already reaped,
> > but returns a stale pidfd if the task is reaped immediately after the
> > respective alive-check.

after the quick grep it seems that SO_PEERPIDFD can simply use
__pidfd_prepare() ? We know that sk->sk_peer_pid was initialized with
task_tgid(current) and thus we know it is (was) a valid TGID pid.

The same is probably true for scm->pid and scm_pidfd_recv()...

But again, I am not familiar with this code, I can be wrong.

Oleg.

\
 
 \ /
  Last update: 2023-08-11 13:49    [W:1.114 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site