]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: platform: fix race condition with driver_override
authorAdrian Salido <salidoa@google.com>
Tue, 25 Apr 2017 23:55:26 +0000 (16:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:30:12 +0000 (15:30 +0200)
commitcddafb61a131d3531eb5de0e83277855913351f0
tree4d58fb16d141567390c35553bbb2af47fd82c9c9
parent4ca6e51b940d7e938a17cd36206a7ae158216d70
driver core: platform: fix race condition with driver_override

The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.

Fixes: f5f2f5836e37 ("driver core: platform: add device binding path 'driver_override'")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Salido <salidoa@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c