lkml.org 
[lkml]   [2017]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] pid: Replace pid bitmap implementation with IDR API
On 09/27, Gargi Sharma wrote:
>
> >
> > And make this patch correct ;)
> >
> > because currently it is wrong, zap_pid_ns_processes() won't kill the pid
> > returned by the first idr_get_next().
> Yes, I missed this. I can simply remove the idr_get_next() before the
> idr_for_each_continue and that will take care of it.

Yes, and also remove the while(pid) loop as Rik suggests, just do

read_lock(&tasklist_lock);
nr = 2;
idr_for_each_entry_continue(..., nr) {
kill pid_task()
}
read_unlock(&tasklist_lock);

Oleg.

\
 
 \ /
  Last update: 2017-09-27 17:18    [W:0.076 / U:4.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site