lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 25 Sep 2017 23:11:49 +0530 From: Gargi Sharma <gs051095@...il.com> To: Oleg Nesterov <oleg@...hat.com> Cc: linux-kernel@...r.kernel.org, Rik van Riel <riel@...riel.com>, Julia Lawall <julia.lawall@...6.fr>, akpm@...ux-foundation.org, mingo@...nel.org, pasha.tatashin@...cle.com, ktkhai@...tuozzo.com Subject: Re: [PATCH 1/4] pid: Replace pid bitmap implementation with IDR API On Mon, Sep 25, 2017 at 8:50 PM, Oleg Nesterov <oleg@...hat.com> wrote: > On 09/25, Gargi Sharma wrote: >> >> @@ -285,10 +145,14 @@ void free_pid(struct pid *pid) >> break; >> } >> } >> - spin_unlock_irqrestore(&pidmap_lock, flags); >> >> - for (i = 0; i <= pid->level; i++) >> - free_pidmap(pid->numbers + i); >> + for (i = 0; i <= pid->level; i++) { >> + struct upid *upid = pid->numbers + i; >> + struct pid_namespace *ns = upid->ns; >> + >> + idr_remove(&ns->idr, upid->nr); >> + } >> + spin_unlock_irqrestore(&pidmap_lock, flags); > > Now that you moved the "free pidmap" code under pidmap_lock, we do not > need 2 "for (i = 0; i <= pid->level; i++)" loops, you could simply add > a single > > idr_remove(&ns->idr, upid->nr); > > line into the 1st loop ? Yes, I can do that. Will make this change. Thanks! Gargi > > Oleg. >
Powered by blists - more mailing lists