lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/1] waitid: Add support for waiting for the current process group
On 08/14, christian.brauner@ubuntu.com wrote:
>
> case P_PGID:
> type = PIDTYPE_PGID;
> - if (upid <= 0)
> + if (upid < 0)
> return -EINVAL;
> +
> + if (upid == 0)
> + pid = get_pid(task_pgrp(current));

this needs rcu lock or tasklist_lock, this can race with another thread
doing sys_setpgid/setsid (see change_pid(PIDTYPE_PGID)).

Oleg.

\
 
 \ /
  Last update: 2019-08-14 14:30    [W:0.038 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site