All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: Schspa Shi <schspa@gmail.com>
Cc: gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com,
	maco@android.com, joel@joelfernandes.org, brauner@kernel.org,
	hridya@google.com, surenb@google.com,
	linux-kernel@vger.kernel.org,
	syzbot+46fff6434a7f968ecb39@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] binder: fix atomic sleep when get extended error
Date: Wed, 18 May 2022 01:27:13 +0000	[thread overview]
Message-ID: <YoRLcfSC//FZn1UI@google.com> (raw)
In-Reply-To: <20220518011754.49348-1-schspa@gmail.com>

On Wed, May 18, 2022 at 09:17:54AM +0800, Schspa Shi wrote:
> binder_inner_proc_lock(thread->proc) is a spin lock, copy_to_user can't
> be called with in this lock.
> 
> Copy it as a local variable to fix it.
> 
> Reported-by: syzbot+46fff6434a7f968ecb39@syzkaller.appspotmail.com
> Fixes: bd32889e841c ("binder: add BINDER_GET_EXTENDED_ERROR ioctl")
> Signed-off-by: Schspa Shi <schspa@gmail.com>
> 
> ---
> 
> Changelog:
> v1 -> v2:
>         - Remove the retry as Carlos Llamas adviced.
>         - Use binder_set_extended_error to reset the error info.
> ---

LGTM, thanks.

Reviewed-by: Carlos Llamas <cmllamas@google.com>

--
Carlos Llamas

      reply	other threads:[~2022-05-18  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  1:17 [PATCH v2] binder: fix atomic sleep when get extended error Schspa Shi
2022-05-18  1:27 ` Carlos Llamas [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=YoRLcfSC//FZn1UI@google.com \
    --to=cmllamas@google.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=schspa@gmail.com \
    --cc=surenb@google.com \
    --cc=syzbot+46fff6434a7f968ecb39@syzkaller.appspotmail.com \
    --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.