diff options
| author | Ajay Kaher <[email protected]> | 2017-03-28 08:09:32 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-03-29 11:55:25 +0200 |
| commit | 2f86a96be0ccb1302b7eee7855dbee5ce4dc5dfb (patch) | |
| tree | 5babb1236173c80b67a53cc0adb5420a87250503 /tools/perf/scripts/python | |
| parent | 041370cce889510163d9c1f677dc298d37bfb732 (diff) | |
USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
There is race condition when two USB class drivers try to call
init_usb_class at the same time and leads to crash.
code path: probe->usb_register_dev->init_usb_class
To solve this, mutex locking has been added in init_usb_class() and
destroy_usb_class().
As pointed by Alan, removed "if (usb_class)" test from destroy_usb_class()
because usb_class can never be NULL there.
Signed-off-by: Ajay Kaher <[email protected]>
Acked-by: Alan Stern <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions