Thread (3 messages) 3 messages, 2 authors, 2021-05-26

Re: [PATCH v2] HID: magicmouse: fix crash when disconnecting Magic Trackpad 2

From: Jiri Kosina <jikos@kernel.org>
Date: 2021-05-26 10:44:45
Also in: lkml

On Mon, 10 May 2021, José Expósito wrote:
When the Apple Magic Trackpad 2 is connected over USB it registers four
hid_device report descriptors, however, the driver only handles the one
with type HID_TYPE_USBMOUSE and ignores the other three, thus, no driver
data is attached to them.

When the device is disconnected, the remove callback is called for the
four hid_device report descriptors, crashing when the driver data is
NULL.

Check that the driver data is not NULL before using it in the remove
callback.
Applied, thank you.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help