Messages in this thread | | | Date | Wed, 27 Sep 2017 17:15:42 +0200 | From | Oleg Nesterov <> | Subject | Re: [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.
| |