All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Yuichiro Goto <goto@k-tech.co.jp>
Cc: a.hindborg@kernel.org, viro@zeniv.linux.org.uk,
	 linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] configfs: wait for pending RCU callbacks on module exit
Date: Fri, 13 Nov 2026 03:33:14 -0800	[thread overview]
Message-ID: <avb1CyLqJGI_MtXv@gmail.com> (raw)
In-Reply-To: <20261113033833.124797-1-goto@k-tech.co.jp>

On Fri, Nov 13, 2026 at 12:38:33PM +0900, Yuichiro Goto wrote:
> configfs inodes are freed from an RCU callback: destroy_inode() queues
> i_callback() with call_rcu(), and i_callback() then calls the
> ->free_inode() of the super block, configfs_free_inode(). Nothing in
> configfs_exit() waits for these callbacks, so the module can go away
> while some of them are still pending, and they later jump into freed
> module text.

Is this still the case on mainline? Since commit 3bc999d944b3 ("mm/slab:
introduce kfree_rcu_nolock()") in v7.3, kmem_cache_destroy() calls
rcu_barrier() unconditionally, and configfs_exit() already reaches it:

configfs_exit()
	kmem_cache_destroy(configfs_dir_cachep)
		kvfree_rcu_barrier_on_cache()
			rcu_barrier()

so the pending configfs_free_inode() calls finish before configfs_exit()
returns.

      reply	other threads:[~2026-11-13 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  3:38 [PATCH] configfs: wait for pending RCU callbacks on module exit Yuichiro Goto
2026-11-13 11:33 ` Breno Leitao [this message]

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=avb1CyLqJGI_MtXv@gmail.com \
    --to=leitao@debian.org \
    --cc=a.hindborg@kernel.org \
    --cc=goto@k-tech.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.