[lkml]   [2021]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH net v2] r8152: check the informaton of the device
Johan Hovold <>
> Sent: Saturday, May 22, 2021 4:07 PM
> > > + if (usb_endpoint_num(in) != 1) {
> > > + dev_err(&intf->dev, "Invalid Rx Endpoint\n");
> >
> > "Invalid number of Rx endpoints"
> Here it is the endpoint number (address) that is being checked so
> "number of" would be wrong.
> That said, perhaps none of these checks are even needed a bit depending
> on how the driver is implemented. That is, if it hardcodes the endpoint
> addresses or uses the result from usb_find_common_endpoints() above
> (which I realise now that it does not so these checks are probably still
> needed).

The purpose of the checks is to find out the fake devices. That is, even
the device supports in, out, and interrupt endpoints, it is treated as
fake or malicious device, if the addresses of these endpoints are wrong.
Therefore, I would keep the checks.

Best Regards,

 \ /
  Last update: 2021-05-24 03:50    [W:0.107 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site