All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Christian Brauner <christian@brauner.io>,
	Meta kernel team <kernel-team@meta.com>,
	linux-kselftest@vger.kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/3] kernfs: don't lose IN_DELETE_SELF when decoding a file handle
Date: Thu, 3 Sep 2026 10:23:15 -1000	[thread overview]
Message-ID: <apnXMzZO5wcFIInw@slm.duckdns.org> (raw)
In-Reply-To: <20260903040253.670020-2-shakeel.butt@linux.dev>

On Wed, Sep 02, 2026 at 09:02:52PM -0700, Shakeel Butt wrote:
> __kernfs_remove() clears i_nlink on the inode each superblock holds for
> the node, and finds those inodes with ilookup().  A lookup that has
> pinned the node but has not put its new inode in the inode hash yet is
> invisible to that pass:
> 
>   CPU0                                    CPU1
>   open_by_handle_at()
>     kernfs_find_and_get_node_by_id()
>       pins the node, still active
>                                           rmdir()
>                                             marks the subtree removing
>                                             ilookup() finds no inode
>     kernfs_get_inode()
>       hashes an inode with i_nlink 1
...
> Fixes: eea5d2bb34ba ("kernfs: Send IN_DELETE_SELF and IN_IGNORED")
> Cc: stable@vger.kernel.org
> Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

  reply	other threads:[~2026-09-03 20:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  4:02 [PATCH 1/3] kernfs: take kernfs_rename_lock for same-parent renames too Shakeel Butt
2026-09-03  4:02 ` [PATCH 2/3] kernfs: don't lose IN_DELETE_SELF when decoding a file handle Shakeel Butt
2026-09-03 20:23   ` Tejun Heo [this message]
2026-09-03  4:02 ` [PATCH 3/3] kernfs: fix up the unlocked attribute reads on the creation paths Shakeel Butt
2026-09-03 20:26   ` Tejun Heo
2026-09-03 21:15     ` Shakeel Butt
2026-09-03  4:31 ` [PATCH 1/3] kernfs: take kernfs_rename_lock for same-parent renames too Greg Kroah-Hartman
2026-09-03  5:37   ` Shakeel Butt
     [not found]   ` <6a990797.3e7a366d.3bd849.72d1SMTPIN_ADDED_BROKEN@mx.google.com>
2026-09-03  5:41     ` Greg Kroah-Hartman
2026-09-03  6:15       ` Shakeel Butt
2026-09-03 16:08         ` Shakeel Butt
2026-09-03 20:21 ` Tejun Heo

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=apnXMzZO5wcFIInw@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=christian@brauner.io \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.