]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: amba: Fix race condition with driver_override
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 10 Apr 2018 13:21:44 +0000 (15:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 16:07:10 +0000 (18:07 +0200)
commitec4a0a0601e6c58aba6bd7eb4e75da03b9b2396f
treebb4455725169c7e4017c4bc6e27ccd981f1dc6d9
parent527714e0b38745351aa78bbe29f6bca9f5775aa8
ARM: amba: Fix race condition with driver_override

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 cddafb61a131d353 ("driver core: platform: fix race
condition with driver_override") and 7551b6075e6586ae ("PCI: Fix race
condition with driver_override").

Fixes: 1a90ac7b8df327bc ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/amba/bus.c