mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: ritu pal <ritupal888@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	NeilBrown <neil@brown.name>, Chen Ni <nichen@iscas.ac.cn>
Subject: Re: ipc/mqueue: release spinlock before freeing node_cache in mqueue_evict_inode()
Date: Thu, 3 Jul 2025 09:10:51 +0100	[thread overview]
Message-ID: <20250703081051.GK1880847@ZenIV> (raw)
In-Reply-To: <CAEy91+Z=8+MsK10uiMiAf0k-EWSd3-o33yfckc3tsEz7pvmjVA@mail.gmail.com>

On Thu, Jul 03, 2025 at 01:34:39PM +0530, ritu pal wrote:
> > 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.

Describe the call chain in that other thread, please.  If there is one,
you've got a UAF scenario.

  reply	other threads:[~2025-07-03  8:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEy91+YpzU5tKEfsjt1_Hh0fsiCfVVK099EztXOPFGHFYyA1KQ@mail.gmail.com>
2025-06-27 16:37 ` Al Viro
2025-07-03  8:04   ` ritu pal
2025-07-03  8:10     ` Al Viro [this message]
2025-06-27 12:46 ritu pal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250703081051.GK1880847@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=nichen@iscas.ac.cn \
    --cc=ritupal888@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®