Re: [PATCH] HID: magicmouse: fix NULL-deref on disconnect

From
Jiri Kosina <jikos@kernel.org>
Date
2021-05-26 10:51:15
Also in
lkml, stable
Reply to
Johan Hovold, 2021-05-17
On Mon, 17 May 2021, Johan Hovold wrote:
Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic
Trackpad 2") added a sanity check for an Apple trackpad but returned
success instead of -ENODEV when the check failed. This means that the
remove callback will dereference the never-initialised driver data
pointer when the driver is later unbound (e.g. on USB disconnect).

Reported-by: <redacted>
Fixes: 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2")
Cc: <redacted>      # 4.20
Cc: Claudio Mettler <redacted>
Cc: Marek Wyborski <redacted>
Cc: Sean O'Brien <redacted>
Signed-off-by: Johan Hovold <johan@kernel.org>
Applied, thanks Johan.

-- 
Jiri Kosina
SUSE Labs
Thread (2 messages) 2 messages, 2 authors, last reply 2021-05-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help