From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795959215; b=y7tsJjpLsq4UmK/x7AOE2ACtliuYMrbIIhPeO7qd0MP26c9ZnQIAfqd6vRDUSojg1SRg yKQkek49GSyJ0mg4oi1LASSlJAbDsMFbI5qLe0XUVPz9uB+qdL78CgutKlByoqEy0YAW+ z1njQoI0iaQZqtEn9C8rKcNS24KDU3ATmAhp3Sw21PguJlE/yJqWaLeA9lHCyE8B3Awnb pm4I36FbyDeHAy0PhyAcqHijmBz1ubC4mEqMSSD2eqYMjTF/T5Y8w1UGPGsRV2+LmCXrX 2Nlhbez/KXeZE/Dg87FQthHFaYyt4E5xsvgRU5OAJkAfjeHzbRlBC27sa2XdObej7Cw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795959215; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=qln7/7HMhC0378oFYBKOK7ogHkgYX2SJ/hQe9ORoo2Q=; b=ERhpS6wnQe9VJejj/vk+fYlOdMaeFg+a3ZJL69kmTSxVGEHtvw5JAxnFKvTBYVwv1jih OXasInrz63Hsj2BWo504gs2yPjtrWImEo/TkeuZF/l7oNy9ZN5O57d0WCqmyXJE3ZdJTd WhLqVuYFMlb1oq0ystf0XuN2LbA+/FMQYVfDsUJpINICX9NBR23GDlZEekiS8wWgP+3Bs 8lTjoBS7GvH4K+vbcanLBkK1Apl7UBm2ZZwoE4s9SQrY+4u5//KJFYV1cJI8hypT4swUp CZLYe6y/CD0hiHDFF7jk44bAqRbj4Vg87F1zMdKapnz+WNxJ+cz7qEoIO6IV0Zienow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="c6fulk2/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2F8F606A31C for ; Sun, 29 Nov 2026 13:33:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=c6fulk2/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id D84DC1F000C1; Sun, 29 Nov 2026 13:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795959215; bh=qln7/7HMhC0378oFYBKOK7ogHkgYX2SJ/hQe9ORoo2Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=c6fulk2/XJbi5DNLF4SnRkR1oln83a4ueNdADROuAzww4AmWMjfQ2+hBMRA3KBEFw GsOhIupwMBBNw+hbsaWuvU6e1mem3EpqEpB8o3F/aCTMfw3oqBPxYNoX0BqPlHLRK+ RV06Fh0k0j9517WRYkqo8a5uiCDAe+i8vyR/BoFk= Date: Sun, 29 Nov 2026 14:33:32 +0100 From: Greg KH To: Chao Huang <958028483@qq.com> Cc: cmllamas@google.com, aliceryhl@google.com, arve@android.com, tkjos@android.com, brauner@kernel.org, linux-kernel@vger.kernel.org, Chao Huang Subject: Re: [PATCH v4] binderfs: free minor on binder-control creation failure Message-ID: <2026112915-cyclic-cadet-1924@gregkh> References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Nov 29, 2026 at 09:27:06PM +0800, Chao Huang wrote: > From: Chao Huang > > 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. > > Release the minor from a dedicated error path after a successful > allocation. > > Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver") > Acked-by: Carlos Llamas > --- > Changes in v4: > - Update only rust_binderfs.c because drivers/android/binderfs.c has been > removed from the current tree. > What about versions 1-3? And you didn't sign off on this :(