HID: core: allow concurrent registration of drivers
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 31 May 2018 11:49:29 +0000 (13:49 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 25 Jun 2018 13:29:16 +0000 (15:29 +0200)
commit8f732850df1b2b4d8d719f7e606dfb3050e7ea11
tree6404276bcb01659e9933242c89a9ba7672edcb66
parentd471b6b22d37bf9928c6d0202bdaaf76583b8b61
HID: core: allow concurrent registration of drivers

Detected on the Dell XPS 9365.

The laptop has 2 devices that benefit from the hid-generic auto-unbinding.
When those 2 devices are presented to the userspace, udev loads both wacom and
hid-multitouch. When this happens, the code in __hid_bus_reprobe_drivers() is
called concurrently and the second device gets reprobed twice.

An other bug in the power_supply subsystem prevent to remove the wacom driver
if it just finished its initialization, which basically kills the wacom node.

[jkosina@suse.cz: reformat changelog a bit]
Fixes c17a7476e4c4 ("HID: core: rewrite the hid-generic automatic unbind")
Cc: stable@vger.kernel.org # v4.17
Tested-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
include/linux/hid.h