diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-11-03 15:33:32 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-11-03 17:31:19 -0500 |
commit | 9c5c6ed7b5078ba42b1c769a1c29b3ae4a6bee36 (patch) | |
tree | b2a5b8737114dd0a8b5a509ee0ef5f0ac20d5e2e | |
parent | fa51ee1085d6f2fa344d4ba64faadc9c6db0a3f1 (diff) |
HID: core: cleanup .claimed field on disconnect
When a subdriver is rmmod-ed then re-insmod-ed, the hid device is not
destroyed as it is owned by the transport layer.
So when we re-probed the device, the hid device is assumed to be already
claimed, and can lead to page faults if hid-core tries to forward the
emitted data to the to-be-created claimed node.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 73bd9e2e42bc..3402033fa52a 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1659,6 +1659,7 @@ void hid_disconnect(struct hid_device *hdev) | |||
1659 | hdev->hiddev_disconnect(hdev); | 1659 | hdev->hiddev_disconnect(hdev); |
1660 | if (hdev->claimed & HID_CLAIMED_HIDRAW) | 1660 | if (hdev->claimed & HID_CLAIMED_HIDRAW) |
1661 | hidraw_disconnect(hdev); | 1661 | hidraw_disconnect(hdev); |
1662 | hdev->claimed = 0; | ||
1662 | } | 1663 | } |
1663 | EXPORT_SYMBOL_GPL(hid_disconnect); | 1664 | EXPORT_SYMBOL_GPL(hid_disconnect); |
1664 | 1665 | ||