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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUF8NT5_i6y85-zc@tycho.pizza>
Date: Tue, 16 Dec 2025 08:35:17 -0700
From: Tycho Andersen <tycho@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Christian Brauner <brauner@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pid: remove unnecessary idr_preload()

On Tue, Dec 16, 2025 at 10:39:58AM +0100, Oleg Nesterov wrote:
> On 12/15, Tycho Andersen wrote:
> >
> > From: "Tycho Andersen (AMD)" <tycho@...nel.org>
> >
> > As near as I can tell, nothing in the second pidmap_lock critical section
> > actually allocates an id, so there is no need to do idr_preload().
> > idr_replace() does not, nor does pidfs_add_pid().
> 
> Yes. The extra idr_preload() was needed for pidfs_add_pid() after the commit
> 9698d5a483654 ("pidfs: rework inode number allocation").
> 
> But please see
> [PATCH v3 2/2] pid: only take pidmap_lock once on alloc
> https://lore.kernel.org/all/20251206131955.780557-3-mjguzik@gmail.com/

Oh, nice. I was looking at doing this too. I'll head over to that
thread...

Tycho

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ