diff options
author | Oliver Neukum <[email protected]> | 2024-06-20 13:40:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-06-20 19:33:22 +0200 |
commit | e587a7633dfee8987a999cf253f7c52a8e09276c (patch) | |
tree | bf72d2ac0cd5eb70f8d9f1681bef63b33a273fa0 /kernel/workqueue.c | |
parent | fd80731e5e9d1402cb2f85022a6abf9b1982ec5f (diff) |
usb: gadget: printer: fix races against disable
printer_read() and printer_write() guard against the race
against disable() by checking the dev->interface flag,
which in turn is guarded by a spinlock.
These functions, however, drop the lock on multiple occasions.
This means that the test has to be redone after reacquiring
the lock and before doing IO.
Add the tests.
This also addresses CVE-2024-25741
Fixes: 7f2ca14d2f9b9 ("usb: gadget: function: printer: Interface is disabled and returns error")
Cc: stable <[email protected]>
Signed-off-by: Oliver Neukum <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'kernel/workqueue.c')
0 files changed, 0 insertions, 0 deletions