Commit c01ace7
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: 3d713e0 ("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>1 parent 4043d5b commit c01ace7
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
823 | 825 | | |
824 | 826 | | |
825 | 827 | | |
826 | 828 | | |
827 | 829 | | |
828 | 830 | | |
| 831 | + | |
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
| |||
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
| 842 | + | |
839 | 843 | | |
840 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
841 | 848 | | |
842 | 849 | | |
843 | 850 | | |
| |||
0 commit comments