[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2105261244270.28378@cbobk.fhfr.pm>
Date: Wed, 26 May 2021 12:44:37 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: José Expósito <jose.exposito89@...il.com>
cc: benjamin.tissoires@...hat.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] HID: magicmouse: fix crash when disconnecting Magic
Trackpad 2
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
Powered by blists - more mailing lists