From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, Alice Ryhl <aliceryhl@google.com>
Subject: Re: [PATCH][RFC] rust_binderfs: fix a dentry leak (regression from tree-in-dcache conversion)
Date: Thu, 5 Feb 2026 09:02:49 +0100 [thread overview]
Message-ID: <2026020533-covenant-overstuff-ea0f@gregkh> (raw)
In-Reply-To: <20260205074342.GR3183987@ZenIV>
On Thu, Feb 05, 2026 at 07:43:42AM +0000, Al Viro wrote:
> [just realized that this one had been sitting in #fixes without being
> posted - sorry]
>
> Parallel to binderfs patches - 02da8d2c0965 "binderfs_binder_ctl_create():
> kill a bogus check" and the bit of b89aa544821d "convert binderfs" that
> got lost when making 4433d8e25d73 "convert rust_binderfs"; the former is
> a cleanup, the latter is about marking /binder-control persistent, so that
> it would be taken out on umount.
>
> Fixes: 4433d8e25d73 ("convert rust_binderfs")
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/android/binder/rust_binderfs.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/android/binder/rust_binderfs.c b/drivers/android/binder/rust_binderfs.c
> index c69026df775c..e36011e89116 100644
> --- a/drivers/android/binder/rust_binderfs.c
> +++ b/drivers/android/binder/rust_binderfs.c
> @@ -391,12 +391,6 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
> if (!device)
> return -ENOMEM;
>
> - /* If we have already created a binder-control node, return. */
> - if (info->control_dentry) {
> - ret = 0;
> - goto out;
> - }
> -
> ret = -ENOMEM;
> inode = new_inode(sb);
> if (!inode)
> @@ -431,7 +425,8 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
>
> inode->i_private = device;
> info->control_dentry = dentry;
> - d_add(dentry, inode);
> + d_make_persistent(dentry, inode);
> + dput(dentry);
>
> return 0;
>
> --
> 2.47.3
>
Nice! Want me to take this in my tree, or are you going to send this to
Linus before -final happens?
thanks,
greg k-h
next prev parent reply other threads:[~2026-02-05 8:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 7:43 [PATCH][RFC] rust_binderfs: fix a dentry leak (regression from tree-in-dcache conversion) Al Viro
2026-02-05 8:02 ` Greg Kroah-Hartman [this message]
2026-02-05 8:08 ` Alice Ryhl
2026-02-05 8:27 ` Christian Brauner
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=2026020533-covenant-overstuff-ea0f@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=aliceryhl@google.com \
--cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox