UPSTREAM: driver core: platform: fix race condition with driver_override
commit 6265539776a0810b7ce6398c27866ddb9c6bd154 upstream.
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: 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'")
Signed-off-by: Adrian Salido <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
(cherry picked from commit c01ace719ebe6353f0c96e56f6c75c22ad3f67b0)
Signed-off-by: Aditya Kali <email@example.com>
Reviewed-by: Daniel Wang <firstname.lastname@example.org>
Reviewed-by: Dmitry Torokhov <email@example.com>
Tested-by: Aditya Kali <firstname.lastname@example.org>
Commit-Queue: Aditya Kali <email@example.com>
1 file changed