提交 9c5c6ed7 编写于 作者: B Benjamin Tissoires 提交者: Jiri Kosina

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: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 fa51ee10
...@@ -1659,6 +1659,7 @@ void hid_disconnect(struct hid_device *hdev) ...@@ -1659,6 +1659,7 @@ void hid_disconnect(struct hid_device *hdev)
hdev->hiddev_disconnect(hdev); hdev->hiddev_disconnect(hdev);
if (hdev->claimed & HID_CLAIMED_HIDRAW) if (hdev->claimed & HID_CLAIMED_HIDRAW)
hidraw_disconnect(hdev); hidraw_disconnect(hdev);
hdev->claimed = 0;
} }
EXPORT_SYMBOL_GPL(hid_disconnect); EXPORT_SYMBOL_GPL(hid_disconnect);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册