Re: [PATCH v3 3/3] HID: check for valid USB device for many HID drivers
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-12-02 11:54:49
On Thu, Dec 02, 2021 at 10:25:46AM +0100, Greg Kroah-Hartman wrote:
On Thu, Dec 02, 2021 at 10:08:07AM +0100, Benjamin Tissoires wrote:quoted
On Wed, Dec 1, 2021 at 7:35 PM Greg Kroah-Hartman [off-list ref] wrote:quoted
Many HID drivers assume that the HID device assigned to them is a USB device as that was the only way HID devices used to be able to be created in Linux. However, with the additional ways that HID devices can be created for many different bus types, that is no longer true, so properly check that we have a USB device associated with the HID device before allowing a driver that makes this assumption to claim it. Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <redacted> Cc: Michael Zaidman <michael.zaidman@gmail.com> Cc: Stefan Achatz <erazor_de@users.sourceforge.net> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- v3: add check in hid-sony based on fix from Benjamin.Sigh. This morning I realized my fix was incomplete as the error path of the GHL devices handling is not releasing the hidraw node. I have a followup patch ready that I am about to send as soon as I get the full tests run. Also, I guess we want this series to land in 5.16-rc4 or rc5 and mark it as stable, no? If so, I'll add the cc stable@vger.kernel.org marks so you don't need to keep tabs on it.That would be great, thanks!quoted
Besides that, I tested the wacom change on an I2C screen, and it is still working as expected, so I think the wacom changes are safe. The full series is Tested-by: Benjamin Tissoires <redacted>Wonderful. Note, I did just get some really odd 0-day error messages from this patch series: https://lore.kernel.org/r/202112021000.3GKuE8mS-lkp@intel.com (local) https://lore.kernel.org/r/202112020808.AZ5usuXj-lkp@intel.com (local) Which looks like a dependancy issue that might have always been there. I'll work on resolving that after lunch...
Now sent: https://lore.kernel.org/r/20211202114819.2511954-1-gregkh@linuxfoundation.org (local) I can resend it as a v4 series that adds this to the end of the series if you want me to. thanks, greg k-h