diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2023-02-22 12:38:38 +0300 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2023-02-22 12:38:38 +0300 |
commit | 3ba2824ca2e38c4fa80086a91f09f2187ea120ef (patch) | |
tree | 52cad376054ba88c505d1423ad860ba58f0d7402 | |
parent | a74749efb41253853a96815710a860591f7a03d9 (diff) | |
parent | 47e91fdfa511139f2549687edb0d8649b123227b (diff) | |
download | linux-3ba2824ca2e38c4fa80086a91f09f2187ea120ef.tar.xz |
Merge branch 'for-6.3/mcp2221' into for-linus
prevent UAF in delayed work (Benjamin Tissoires)
-rw-r--r-- | drivers/hid/hid-mcp2221.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c index e61dd039354b..f74a977cf8f8 100644 --- a/drivers/hid/hid-mcp2221.c +++ b/drivers/hid/hid-mcp2221.c @@ -922,6 +922,9 @@ static void mcp2221_hid_unregister(void *ptr) /* This is needed to be sure hid_hw_stop() isn't called twice by the subsystem */ static void mcp2221_remove(struct hid_device *hdev) { + struct mcp2221 *mcp = hid_get_drvdata(hdev); + + cancel_delayed_work_sync(&mcp->init_work); } #if IS_REACHABLE(CONFIG_IIO) |