All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Chao Huang <958028483@qq.com>
Cc: "Carlos Llamas" <cmllamas@google.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Christian Brauner" <brauner@kernel.org>,
	linux-kernel@vger.kernel.org, "Chao Huang" <huangchao@kylinos.cn>
Subject: Re: [PATCH] binderfs: free minor on binder-control creation failure
Date: Sat, 8 Aug 2026 13:34:58 +0000	[thread overview]
Message-ID: <ancwgkUx5b-pERfz@google.com> (raw)
In-Reply-To: <tencent_F96515DBF7548CE7B53D517CE7D204DF580A@qq.com>

On Thu, Aug 06, 2026 at 07:23:38PM +0800, Chao Huang wrote:
> From: Chao Huang <huangchao@kylinos.cn>
> 
> binderfs_binder_ctl_create() allocates a minor before creating the
> binder-control dentry. If d_alloc_name() fails, the error path frees the
> device and drops the inode, but leaves the minor allocated in
> binderfs_minors. Repeated failures can therefore exhaust the global minor
> IDA.
> 
> Initialize minor to an invalid value and release it from the common error
> path after a successful allocation.
> 
> Signed-off-by: Chao Huang <huangchao@kylinos.cn>

Thanks!
Please fix drivers/android/binder/rust_binderfs.c as well.

Alice

  reply	other threads:[~2026-08-08 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 11:23 [PATCH] binderfs: free minor on binder-control creation failure Chao Huang
2026-08-08 13:34 ` Alice Ryhl [this message]
2026-08-10  9:32   ` [PATCH v2] " Chao Huang
2026-08-10 20:16     ` Carlos Llamas
2026-08-11  1:05       ` [PATCH v3] " Chao Huang
2026-08-11  2:52         ` Carlos Llamas

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=ancwgkUx5b-pERfz@google.com \
    --to=aliceryhl@google.com \
    --cc=958028483@qq.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huangchao@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tkjos@android.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 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.