All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Biren Pandya <birenpandya@gmail.com>
Cc: arve@android.com, tkjos@android.com, brauner@kernel.org,
	cmllamas@google.com, aliceryhl@google.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] android: binderfs: drop manual unlock via scoped_guard()
Date: Wed, 17 Jun 2026 06:55:53 +0530	[thread overview]
Message-ID: <2026061704-study-sandbank-89a8@gregkh> (raw)
In-Reply-To: <20260616175340.60355-2-birenpandya@gmail.com>

On Tue, Jun 16, 2026 at 11:23:41PM +0530, Biren Pandya wrote:
> The device_create function manually protects the minor number allocation
> with binderfs_minors_mutex and relies on multiple manual unlocks on
> success and error paths. This is error-prone and adds boilerplate.
> 
> Refactor the critical section to use the modern scoped_guard(mutex)
> macro. This strictly binds the lock lifecycle to the scope block,
> completely eliminating the manual unlocks and guaranteeing lock
> safety against future code modifications.

We don't do scope guard changes that don't actually fix a bug, as it's
not needed.  Otherwise we would be rewriting large chunks of the kernel
for it.

thanks,

greg k-h

      reply	other threads:[~2026-06-17  1:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 17:53 [PATCH] android: binderfs: drop manual unlock via scoped_guard() Biren Pandya
2026-06-17  1:25 ` Greg KH [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=2026061704-study-sandbank-89a8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=aliceryhl@google.com \
    --cc=arve@android.com \
    --cc=birenpandya@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --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.