Re: [PATCH v5] rust_binder: free minor on binder-control creation failure

From: Alice Ryhl

Date: Mon Nov 30 2026 - 04:08:30 EST


On Sun, Nov 29, 2026 at 10:45:19PM +0800, Chao Huang wrote:
> The binderfs_binder_ctl_create() implementation in rust_binderfs.c
> 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.

Thanks for the v5, though this fix has already been picked up into
char-misc-next via commit 16ecdcab15fb ("rust_binderfs: fix minor number
leak on binder-control creation failure") [1].

[1] https://lore.kernel.org/r/20261102144532.123432-1-adhyanshverma2010@xxxxxxxxx

Alice