All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Adrian Salido <salidoa@google.com>,
	Nicolai Stange <nstange@suse.de>,
	Sasha Levin <Alexander.Levin@microsoft.com>,
	Todd Kjos <tkjos@android.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override
Date: Wed, 9 May 2018 15:32:16 +0200	[thread overview]
Message-ID: <CAMuHMdVD59kA1BRrce+jHEMr7Sq7AqEzQEXJWL7SPDUY32Fgmw@mail.gmail.com> (raw)
In-Reply-To: <20180509103954.GR16141@n2100.armlinux.org.uk>

Hi Russell,

On Wed, May 9, 2018 at 12:39 PM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> On Thu, Apr 26, 2018 at 10:45:49AM +0200, Geert Uytterhoeven wrote:
>> On Thu, Apr 26, 2018 at 10:35 AM, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > On Thu, Apr 26, 2018 at 09:40:08AM +0200, Geert Uytterhoeven wrote:
>> >> On Thu, Apr 26, 2018 at 9:04 AM, Greg Kroah-Hartman
>> >> <gregkh@linuxfoundation.org> wrote:
>> >> > On Wed, Apr 25, 2018 at 07:53:06PM +0200, Geert Uytterhoeven wrote:
>> >> >> On Wed, Apr 25, 2018 at 6:06 PM, Greg Kroah-Hartman
>> >> >> <gregkh@linuxfoundation.org> wrote:
>> >> >> > On Tue, Apr 10, 2018 at 03:21:44PM +0200, Geert Uytterhoeven wrote:
>> >> >> >> The driver_override implementation is susceptible to a race condition
>> >> >> >> when different threads are reading vs storing a different driver
>> >> >> >> override.  Add locking to avoid this race condition.
>> >> >> >>
>> >> >> >> Cfr. commits 6265539776a0810b ("driver core: platform: fix race
>> >> >> >> condition with driver_override") and 9561475db680f714 ("PCI: Fix race
>> >> >> >> condition with driver_override").
>> >> >> >>
>> >> >> >> Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'")
>> >> >> >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> >> >> >> Reviewed-by: Todd Kjos <tkjos@google.com>
>> >> >> >> Cc: stable <stable@vger.kernel.org>
>> >> >>
>> >> >> > As this should go to stable kernels, I've fixed it up to apply without
>> >> >> > patch 1 as that's not a real "fix" that anyone needs...
>> >> >> >
>> >> >> > Please try to remember to put fixes first, and then "trivial" things
>> >> >> > later on in a series.
>> >> >>
>> >> >> I did it on purpose, as the fix is much more ugly without patch 1 applied.
>> >> >> Can't you just take patch 1, too? More consistency is always nice, even for
>> >> >> stable ;-)
>> >> >
>> >> > Consistency is nice, but when you have bug fixes that rely on "trivial"
>> >> > patches, it's usually not nice :(
>> >> >
>> >> > I already committed patch 2 to my tree without 1, so let's leave it
>> >> > as-is for now.
>> >>
>> >> Unfortunately the version you committed is buggy: the race condition
>> >> also covers the NULL check removed by the trivial patch you skipped,
>> >> so now you can get inconsistent behavior (no output or "(null)") on the
>> >> same running kernel version...
>> >>
>> >> Please revert and apply both. Thanks!
>> >
>> > Ugh, you are right, sorry about that.
>> >
>> > I've reverted the offending patch, and added them in the correct order
>> > now, I should have listened to you :)
>>
>> Np, issue detected and fixed.
>> Thanks!
>
> So what about the patches you submitted to the patch system - should
> I pick those up or not?

I think only the 4th patch (#8759) in the series is still applicable.

> Please don't ask other maintainers to take patches that have been
> submitted to the patch system without first changing their status,
> they're liable to get applied anyway.

They got picked up by Greg, on request of a third party who wanted them in
-stable ASAP. Not much I can do to prevent that.
Especially with an "Odd Fixes" maintainership status.

I tried to change the status of the patches Greg applied, but it failed:

    Your request to update the patch failed because:
    An internal state error was detected.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-05-09 13:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 13:21 [PATCH v2 0/4] ARM: amba: driver_override improvements and fixes Geert Uytterhoeven
2018-04-10 13:21 ` [PATCH v2 1/4] ARM: amba: Make driver_override output consistent with other buses Geert Uytterhoeven
2018-04-25 15:53   ` Todd Kjos
2018-04-10 13:21 ` [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override Geert Uytterhoeven
2018-04-25 15:56   ` Todd Kjos
2018-04-25 16:06   ` Greg Kroah-Hartman
2018-04-25 17:53     ` Geert Uytterhoeven
2018-04-26  7:04       ` Greg Kroah-Hartman
2018-04-26  7:40         ` Geert Uytterhoeven
2018-04-26  8:35           ` Greg Kroah-Hartman
2018-04-26  8:45             ` Geert Uytterhoeven
2018-05-09 10:39               ` Russell King - ARM Linux
2018-05-09 13:32                 ` Geert Uytterhoeven [this message]
2018-05-09 14:50                   ` Greg Kroah-Hartman
2018-04-10 13:21 ` [PATCH v2 3/4] ARM: amba: Don't read past the end of sysfs "driver_override" buffer Geert Uytterhoeven
2018-04-25 15:56   ` Todd Kjos
2018-04-10 13:21 ` [PATCH v2 4/4] ARM: amba: Fix wrong indentation in driver_override_store() Geert Uytterhoeven
2018-04-25 15:58   ` Todd Kjos
2018-04-10 22:19 ` [PATCH v2 0/4] ARM: amba: driver_override improvements and fixes Russell King - ARM Linux
2018-04-25 16:08   ` Greg Kroah-Hartman
2018-04-25 17:27   ` Geert Uytterhoeven

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=CAMuHMdVD59kA1BRrce+jHEMr7Sq7AqEzQEXJWL7SPDUY32Fgmw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=Alexander.Levin@microsoft.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nstange@suse.de \
    --cc=salidoa@google.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.