Commit e53fc23
HID: hid-steam: Fix use-after-free when detaching device
When a hid-steam device is removed it must clean up the client_hdev used for
intercepting hidraw access. This can lead to scheduling deferred work to
reattach the input device. Though the cleanup cancels the deferred work, this
was done before the client_hdev itself is cleaned up, so it gets rescheduled.
This patch fixes the ordering to make sure the deferred work is properly
canceled.
Reported-by: [email protected]
Fixes: 7950424 ("HID: hid-steam: Move hidraw input (un)registering to work")
Signed-off-by: Vicki Pfau <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent a6a4f4e commit e53fc23
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
| 1330 | + | |
1330 | 1331 | | |
1331 | 1332 | | |
1332 | 1333 | | |
1333 | 1334 | | |
1334 | | - | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | 1337 | | |
| |||
0 commit comments