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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEy91+Z=8+MsK10uiMiAf0k-EWSd3-o33yfckc3tsEz7pvmjVA@mail.gmail.com>
Date: Thu, 3 Jul 2025 13:34:39 +0530
From: ritu pal <ritupal888@...il.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: linux-kernel@...r.kernel.org, Christian Brauner <brauner@...nel.org>, 
	NeilBrown <neil@...wn.name>, Chen Ni <nichen@...as.ac.cn>
Subject: Re: ipc/mqueue: release spinlock before freeing node_cache in mqueue_evict_inode()

> That spinlock is inside the inode in question; what exactly is going to be
> on the other side of contention?  Note that none of the file methods
> are going to run concurrent with that...

Another thread that's waiting to acquire the spinlock to process the
next item in the mqueue.
This change reduces the hold time of "info->lock", since the kfree()
of the node_cache does not require a spinlock to be held.

On Fri, Jun 27, 2025 at 10:08 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> On Fri, Jun 27, 2025 at 06:11:14PM +0530, ritu pal wrote:
> > Hi,
> >
> > Currently, mqueue_evict_inode() holds info->lock while freeing
> > info->node_cache
> > with kfree(). Although kfree() does not sleep, it may take a non-trivial
> > amount
> > of time, increasing the duration the spinlock is held and potentially
> > impacting
> > concurrency.
>
> That spinlock is inside the inode in question; what exactly is going to be
> on the other side of contention?  Note that none of the file methods
> are going to run concurrent with that...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ