stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [stable] binder: fix race between munmap() and direct reclaim
@ 2019-05-27 21:09 Ben Hutchings
  2019-05-28  6:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Hutchings @ 2019-05-27 21:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin; +Cc: stable

There are commits in the 4.14, 4.19 and 5.0 stable branches that claim
to be backports of:

commit 26528be6720bb40bc8844e97ee73a37e530e9c5e
Author: Todd Kjos <tkjos@android.com>
Date:   Thu Feb 14 15:22:57 2019 -0800

    binder: fix handling of misaligned binder object

However the source changes actually match:

commit 5cec2d2e5839f9c0fec319c523a911e0a7fd299f
Author: Todd Kjos <tkjos@android.com>
Date:   Fri Mar 1 15:06:06 2019 -0800

    binder: fix race between munmap() and direct reclaim

So far as I can see, the former fixes a bug only introduced in 5.1 and
the latter fixes an older bug, so the changes are correct and only the
metadata is not.

Similar mix-ups have happened before and I'm a little disturbed that
this keeps happening.  In any case, you may want to revert and re-apply 
with correct metadata.

Ben.

-- 
Ben Hutchings, Software Developer                         Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] binder: fix race between munmap() and direct reclaim
  2019-05-27 21:09 [stable] binder: fix race between munmap() and direct reclaim Ben Hutchings
@ 2019-05-28  6:51 ` Greg Kroah-Hartman
       [not found]   ` <CAHRSSEzopAbeAv4ap9xTrC1nCbpw1ZPrEYEMZOc5W_EcLZaktQ@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-05-28  6:51 UTC (permalink / raw)
  To: Todd Kjos, Ben Hutchings; +Cc: Sasha Levin, stable

On Mon, May 27, 2019 at 10:09:32PM +0100, Ben Hutchings wrote:
> There are commits in the 4.14, 4.19 and 5.0 stable branches that claim
> to be backports of:
> 
> commit 26528be6720bb40bc8844e97ee73a37e530e9c5e
> Author: Todd Kjos <tkjos@android.com>
> Date:   Thu Feb 14 15:22:57 2019 -0800
> 
>     binder: fix handling of misaligned binder object
> 
> However the source changes actually match:
> 
> commit 5cec2d2e5839f9c0fec319c523a911e0a7fd299f
> Author: Todd Kjos <tkjos@android.com>
> Date:   Fri Mar 1 15:06:06 2019 -0800
> 
>     binder: fix race between munmap() and direct reclaim
> 
> So far as I can see, the former fixes a bug only introduced in 5.1 and
> the latter fixes an older bug, so the changes are correct and only the
> metadata is not.
> 
> Similar mix-ups have happened before and I'm a little disturbed that
> this keeps happening.  In any case, you may want to revert and re-apply 
> with correct metadata.

Note, these backports came directly from Todd, so he can provide more
information about them.  Todd, did something get messed up on your end
and do we need to include another patch to fix this up?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] binder: fix race between munmap() and direct reclaim
       [not found]   ` <CAHRSSEzopAbeAv4ap9xTrC1nCbpw1ZPrEYEMZOc5W_EcLZaktQ@mail.gmail.com>
@ 2019-05-31 20:09     ` Todd Kjos
  2019-06-04 14:50       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Todd Kjos @ 2019-05-31 20:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Todd Kjos, Ben Hutchings, Sasha Levin, stable

Greg,

I'm really confused. [1] was my submittal to stable for "binder: fix
race between munmap() and direct reclaim" which I think looks correct.

For "binder: fix handling of misaligned binder object", I only
submitted to LKML [2]. But then I see [3] for 4.14 (that looks
incorrect as Ben pointed out).

So the result is that fix is present in the LTS trees where it is
needed, but it has the wrong commit message and headline.

I agree with Ben that the cleanest approach is to revert and apply the
correct version (to 4.14, 4.19, 5.0). I think the correct version is
the one I sent [1], but please let me know if you see something I
screwed up or if you need me to do something.

[1] https://www.spinics.net/lists/stable/msg299033.html
[2] https://lkml.org/lkml/2019/2/14/1235
[3] https://lkml.org/lkml/2019/4/30/650

-Todd


On Tue, May 28, 2019 at 9:34 AM Todd Kjos <tkjos@google.com> wrote:
>
> Probably my screw-up. I was working on both of those bug fixes at about the same time. I'll investigate what happened.
>
> On Mon, May 27, 2019 at 11:51 PM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>>
>> On Mon, May 27, 2019 at 10:09:32PM +0100, Ben Hutchings wrote:
>> > There are commits in the 4.14, 4.19 and 5.0 stable branches that claim
>> > to be backports of:
>> >
>> > commit 26528be6720bb40bc8844e97ee73a37e530e9c5e
>> > Author: Todd Kjos <tkjos@android.com>
>> > Date:   Thu Feb 14 15:22:57 2019 -0800
>> >
>> >     binder: fix handling of misaligned binder object
>> >
>> > However the source changes actually match:
>> >
>> > commit 5cec2d2e5839f9c0fec319c523a911e0a7fd299f
>> > Author: Todd Kjos <tkjos@android.com>
>> > Date:   Fri Mar 1 15:06:06 2019 -0800
>> >
>> >     binder: fix race between munmap() and direct reclaim
>> >
>> > So far as I can see, the former fixes a bug only introduced in 5.1 and
>> > the latter fixes an older bug, so the changes are correct and only the
>> > metadata is not.
>> >
>> > Similar mix-ups have happened before and I'm a little disturbed that
>> > this keeps happening.  In any case, you may want to revert and re-apply
>> > with correct metadata.
>>
>> Note, these backports came directly from Todd, so he can provide more
>> information about them.  Todd, did something get messed up on your end
>> and do we need to include another patch to fix this up?
>>
>> thanks,
>>
>> greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] binder: fix race between munmap() and direct reclaim
  2019-05-31 20:09     ` Todd Kjos
@ 2019-06-04 14:50       ` Greg Kroah-Hartman
  2019-06-05 16:43         ` Todd Kjos
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-04 14:50 UTC (permalink / raw)
  To: Todd Kjos; +Cc: Todd Kjos, Ben Hutchings, Sasha Levin, stable

On Fri, May 31, 2019 at 01:09:53PM -0700, Todd Kjos wrote:
> Greg,
> 
> I'm really confused. [1] was my submittal to stable for "binder: fix
> race between munmap() and direct reclaim" which I think looks correct.
> 
> For "binder: fix handling of misaligned binder object", I only
> submitted to LKML [2]. But then I see [3] for 4.14 (that looks
> incorrect as Ben pointed out).
> 
> So the result is that fix is present in the LTS trees where it is
> needed, but it has the wrong commit message and headline.
> 
> I agree with Ben that the cleanest approach is to revert and apply the
> correct version (to 4.14, 4.19, 5.0). I think the correct version is
> the one I sent [1], but please let me know if you see something I
> screwed up or if you need me to do something.
> 
> [1] https://www.spinics.net/lists/stable/msg299033.html
> [2] https://lkml.org/lkml/2019/2/14/1235
> [3] https://lkml.org/lkml/2019/4/30/650

Can you send me a patch series that fixes things up properly?  I really
don't know exactly what to do here, sorry.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] binder: fix race between munmap() and direct reclaim
  2019-06-04 14:50       ` Greg Kroah-Hartman
@ 2019-06-05 16:43         ` Todd Kjos
  2019-06-05 17:49           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Todd Kjos @ 2019-06-05 16:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Todd Kjos, Ben Hutchings, Sasha Levin, stable

On Tue, Jun 4, 2019 at 7:50 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Fri, May 31, 2019 at 01:09:53PM -0700, Todd Kjos wrote:
> > Greg,
> >
> > I'm really confused. [1] was my submittal to stable for "binder: fix
> > race between munmap() and direct reclaim" which I think looks correct.
> >
> > For "binder: fix handling of misaligned binder object", I only
> > submitted to LKML [2]. But then I see [3] for 4.14 (that looks
> > incorrect as Ben pointed out).
> >
> > So the result is that fix is present in the LTS trees where it is
> > needed, but it has the wrong commit message and headline.
> >
> > I agree with Ben that the cleanest approach is to revert and apply the
> > correct version (to 4.14, 4.19, 5.0). I think the correct version is
> > the one I sent [1], but please let me know if you see something I
> > screwed up or if you need me to do something.
> >
> > [1] https://www.spinics.net/lists/stable/msg299033.html
> > [2] https://lkml.org/lkml/2019/2/14/1235
> > [3] https://lkml.org/lkml/2019/4/30/650
>
> Can you send me a patch series that fixes things up properly?  I really
> don't know exactly what to do here, sorry.

Sent. 2 patches for each of 4.14, 4.19, 5.0 (1/2=revert of bad patch,
2/2 apply good patch). Code ends up the same.

-Todd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable] binder: fix race between munmap() and direct reclaim
  2019-06-05 16:43         ` Todd Kjos
@ 2019-06-05 17:49           ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-05 17:49 UTC (permalink / raw)
  To: Todd Kjos; +Cc: Todd Kjos, Ben Hutchings, Sasha Levin, stable

On Wed, Jun 05, 2019 at 09:43:53AM -0700, Todd Kjos wrote:
> On Tue, Jun 4, 2019 at 7:50 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Fri, May 31, 2019 at 01:09:53PM -0700, Todd Kjos wrote:
> > > Greg,
> > >
> > > I'm really confused. [1] was my submittal to stable for "binder: fix
> > > race between munmap() and direct reclaim" which I think looks correct.
> > >
> > > For "binder: fix handling of misaligned binder object", I only
> > > submitted to LKML [2]. But then I see [3] for 4.14 (that looks
> > > incorrect as Ben pointed out).
> > >
> > > So the result is that fix is present in the LTS trees where it is
> > > needed, but it has the wrong commit message and headline.
> > >
> > > I agree with Ben that the cleanest approach is to revert and apply the
> > > correct version (to 4.14, 4.19, 5.0). I think the correct version is
> > > the one I sent [1], but please let me know if you see something I
> > > screwed up or if you need me to do something.
> > >
> > > [1] https://www.spinics.net/lists/stable/msg299033.html
> > > [2] https://lkml.org/lkml/2019/2/14/1235
> > > [3] https://lkml.org/lkml/2019/4/30/650
> >
> > Can you send me a patch series that fixes things up properly?  I really
> > don't know exactly what to do here, sorry.
> 
> Sent. 2 patches for each of 4.14, 4.19, 5.0 (1/2=revert of bad patch,
> 2/2 apply good patch). Code ends up the same.

Thanks for that, I'll queue them up soon.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-05 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 21:09 [stable] binder: fix race between munmap() and direct reclaim Ben Hutchings
2019-05-28  6:51 ` Greg Kroah-Hartman
     [not found]   ` <CAHRSSEzopAbeAv4ap9xTrC1nCbpw1ZPrEYEMZOc5W_EcLZaktQ@mail.gmail.com>
2019-05-31 20:09     ` Todd Kjos
2019-06-04 14:50       ` Greg Kroah-Hartman
2019-06-05 16:43         ` Todd Kjos
2019-06-05 17:49           ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).