Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706779 > unrolled thread

Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check.

Started byJohn Stultz <john.stultz@linaro.org>
First post2017-08-08 19:40 +0200
Last post2017-08-08 20:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check. John Stultz <john.stultz@linaro.org> - 2017-08-08 19:40 +0200
    Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check. Greg KH <gregkh@linuxfoundation.org> - 2017-08-08 20:10 +0200
      Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check. John Stultz <john.stultz@linaro.org> - 2017-08-08 20:30 +0200

#1706779 — Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check.

FromJohn Stultz <john.stultz@linaro.org>
Date2017-08-08 19:40 +0200
SubjectRe: [PATCH 3/3] ANDROID: binder: fix proc->tsk check.
Message-ID<ucgE2-3bf-23@gated-at.bofh.it>
On Fri, Jul 28, 2017 at 4:56 AM, Martijn Coenen <maco@android.com> wrote:
> Commit c4ea41ba195d ("binder: use group leader instead of open thread")'
> was incomplete and didn't update a check in binder_mmap(), causing all
> mmap() calls into the binder driver to fail.
>
> Signed-off-by: Martijn Coenen <maco@android.com>
> ---
>  drivers/android/binder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index f7665c31feca..831cdd7d197d 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -3362,7 +3362,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
>         const char *failure_string;
>         struct binder_buffer *buffer;
>
> -       if (proc->tsk != current)
> +       if (proc->tsk != current->group_leader)
>                 return -EINVAL;
>
>         if ((vma->vm_end - vma->vm_start) > SZ_4M)

Tested-by: John Stultz <john.stultz@linaro.org>

As Amit already confirmed, this resolves the wifi and bluetooth
regression I was seeing with Android using 4.13-rc2.

Though I've not seen it show up in Linus' tree yet, so I wanted to
pester folks so it gets into 4.13-rc (its given me some slight grief
trying to bisect down a separate issue).

thanks
-john

[toc] | [next] | [standalone]


#1706790

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-08-08 20:10 +0200
Message-ID<uch74-3Ae-29@gated-at.bofh.it>
In reply to#1706779
On Tue, Aug 08, 2017 at 10:34:47AM -0700, John Stultz wrote:
> On Fri, Jul 28, 2017 at 4:56 AM, Martijn Coenen <maco@android.com> wrote:
> > Commit c4ea41ba195d ("binder: use group leader instead of open thread")'
> > was incomplete and didn't update a check in binder_mmap(), causing all
> > mmap() calls into the binder driver to fail.
> >
> > Signed-off-by: Martijn Coenen <maco@android.com>
> > ---
> >  drivers/android/binder.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > index f7665c31feca..831cdd7d197d 100644
> > --- a/drivers/android/binder.c
> > +++ b/drivers/android/binder.c
> > @@ -3362,7 +3362,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
> >         const char *failure_string;
> >         struct binder_buffer *buffer;
> >
> > -       if (proc->tsk != current)
> > +       if (proc->tsk != current->group_leader)
> >                 return -EINVAL;
> >
> >         if ((vma->vm_end - vma->vm_start) > SZ_4M)
> 
> Tested-by: John Stultz <john.stultz@linaro.org>
> 
> As Amit already confirmed, this resolves the wifi and bluetooth
> regression I was seeing with Android using 4.13-rc2.
> 
> Though I've not seen it show up in Linus' tree yet, so I wanted to
> pester folks so it gets into 4.13-rc (its given me some slight grief
> trying to bisect down a separate issue).

I will queue this up in the next few days, I need to resolve the patches
that have been sent to me for this, sorry for the delay.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1706800

FromJohn Stultz <john.stultz@linaro.org>
Date2017-08-08 20:30 +0200
Message-ID<uchqq-3H2-17@gated-at.bofh.it>
In reply to#1706790
On Tue, Aug 8, 2017 at 11:08 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Tue, Aug 08, 2017 at 10:34:47AM -0700, John Stultz wrote:
>> On Fri, Jul 28, 2017 at 4:56 AM, Martijn Coenen <maco@android.com> wrote:
>> > Commit c4ea41ba195d ("binder: use group leader instead of open thread")'
>> > was incomplete and didn't update a check in binder_mmap(), causing all
>> > mmap() calls into the binder driver to fail.
>> >
>> > Signed-off-by: Martijn Coenen <maco@android.com>
>> > ---
>> >  drivers/android/binder.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
>> > index f7665c31feca..831cdd7d197d 100644
>> > --- a/drivers/android/binder.c
>> > +++ b/drivers/android/binder.c
>> > @@ -3362,7 +3362,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
>> >         const char *failure_string;
>> >         struct binder_buffer *buffer;
>> >
>> > -       if (proc->tsk != current)
>> > +       if (proc->tsk != current->group_leader)
>> >                 return -EINVAL;
>> >
>> >         if ((vma->vm_end - vma->vm_start) > SZ_4M)
>>
>> Tested-by: John Stultz <john.stultz@linaro.org>
>>
>> As Amit already confirmed, this resolves the wifi and bluetooth
>> regression I was seeing with Android using 4.13-rc2.
>>
>> Though I've not seen it show up in Linus' tree yet, so I wanted to
>> pester folks so it gets into 4.13-rc (its given me some slight grief
>> trying to bisect down a separate issue).
>
> I will queue this up in the next few days, I need to resolve the patches
> that have been sent to me for this, sorry for the delay.

No worries. Just wanted to make sure it hadn't gotten lost.

thanks
-john

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web