From: Greg KH <gregkh@linuxfoundation.org>
To: zhengyan <zhengyan@asrmicro.com>
Cc: arve@android.com, tkjos@android.com, maco@android.com,
joel@joelfernandes.org, brauner@kernel.org, cmllamas@google.com,
surenb@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] binder: skip dead binder_proc during binder_open
Date: Tue, 29 Apr 2025 12:43:55 +0200 [thread overview]
Message-ID: <2025042955-drastic-barista-0351@gregkh> (raw)
In-Reply-To: <20250429075030.305-1-zhengyan@asrmicro.com>
On Tue, Apr 29, 2025 at 07:50:30AM +0000, zhengyan wrote:
> During binder_open, the binder_proc list is travesed to check
> for the existing binder_proc instances. binder_proc objects
> are async released in a deferred work after binder_release,
> and may remain temporarily on the binder_procs list even after
> being marked as dead.
Nit, you do have a full 72 columns to use, can you use that?
>
> Without checking the flag, binder_open may face a crash as
> "Unable to handle kernel paging request at virtual address
> dead000000000140"
>
> Signed-off-by: zhengyan <zhengyan@asrmicro.com>
Please use your name, not just an email alias.
> ---
> drivers/android/binder.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 76052006bd87..43ab4350e589 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -6041,6 +6041,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
>
> mutex_lock(&binder_procs_lock);
> hlist_for_each_entry(itr, &binder_procs, proc_node) {
> + if (itr->is_dead)
> + continue;
What commit id does this fix? Should it go to stable kernels? If so,
how far back?
How was this tested?
thanks,
greg k-h
next prev parent reply other threads:[~2025-04-29 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 7:50 [PATCH] binder: skip dead binder_proc during binder_open zhengyan
2025-04-29 10:43 ` Greg KH [this message]
2025-04-29 14:30 ` 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=2025042955-drastic-barista-0351@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
--cc=zhengyan@asrmicro.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.