Commit 1ff89e0
HID: nintendo: fix rumble worker null pointer deref
We can dereference a null pointer trying to queue work to a destroyed
workqueue.
If the device is disconnected, nintendo_hid_remove is called, in which
the rumble_queue is destroyed. Avoid using that queue to defer rumble
work once the controller state is set to JOYCON_CTLR_STATE_REMOVED.
This eliminates the null pointer dereference.
Signed-off-by: Daniel J. Ogorchock <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent 467249a commit 1ff89e0
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1221 | 1221 | | |
1222 | 1222 | | |
1223 | 1223 | | |
| 1224 | + | |
1224 | 1225 | | |
1225 | 1226 | | |
1226 | 1227 | | |
| |||
1545 | 1546 | | |
1546 | 1547 | | |
1547 | 1548 | | |
1548 | | - | |
1549 | 1549 | | |
1550 | 1550 | | |
1551 | | - | |
| 1551 | + | |
1552 | 1552 | | |
1553 | 1553 | | |
| 1554 | + | |
| 1555 | + | |
1554 | 1556 | | |
1555 | 1557 | | |
1556 | 1558 | | |
| |||
0 commit comments