# Re: \[PATCH v3 3/3\] HID: check for valid USB device for many HID drivers

- From: Benjamin Tissoires \<hidden\>
- Date: 2021-12-02 15:21:45 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2021/12/8933629
- Thread: https://ratatoskr.run/linux-input/2021/12/8933620/t.md

```text
On Thu, Dec 2, 2021 at 12:54 PM Greg Kroah-Hartman
[ref] wrote:
>
> 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:
> > > On Wed, Dec 1, 2021 at 7:35 PM Greg Kroah-Hartman
> > > [ref] wrote:
> > > >
> > > > 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: <redacted>
> > > > 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!
> >
> > > 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
> >       https://lore.kernel.org/r/202112020808.AZ5usuXj-lkp@intel.com
> >
> > 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

\o/

>
> I can resend it as a v4 series that adds this to the end of the series
> if you want me to.

That's fine. I already locally scheduled the v3, this other series
above and my 2 first patches from my series that you reviewed today.
I also added the cc: stable markers (though I haven't checked exactly
which versions it applies to).

Once my automated suite is happy I'll push them to hid.git.

Thanks for your time Greg!

Cheers,
Benjamin

>
> thanks,
>
> greg k-h
>

```
