Re: [PATCH v2] usb: fix regression in SuperSpeed endpoint descriptor parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29.03.2016 14:21, Sergei Shtylyov wrote:
Hello.

On 3/29/2016 1:47 PM, Mathias Nyman wrote:

commit b37d83a6a414 ("usb: Parse the new USB 3.1 SuperSpeedPlus Isoc
endpoint companion descriptor") caused a regression in 4.6-rc1 and fails
to parse SuperSpeed endpoint companion descriptors.

The new SuperSpeedPlus Isoc endpoint companion parsing code incorrectly
decreased the the remaining buffer size before comparing the size with the
expected length of the descriptor.

This lead to possible failure in reading the SuperSpeed endpoint companion
descriptor of the last endpoint, displaying a message like:

"No SuperSpeed endpoint companion for config 1 interface 0 altsetting 0
  ep 129: using minimum values"

Fix it by decreasing the size after comparing it.
Also finish all the SS endpoint companion parsing before calling SSP isoc
endpoint parsing function.

    Isn't it another problem?

If you mean moving the parsing of the SSP isoc ep a bit further down in
the function it wasn't a problem at all. It makes the code more sane and
readable, and it was one of the reasons the first version didn't make it.

Alan commented:
"Also, wouldn't it be better in the original patch to call
usb_parse_ssp_isoc_endpoint_companion() after all the SS endpoint
companion stuff is finished, instead of in the middle?"


Fixes: b37d83a6a414

    This tag requires the same format as you used above.

I didn't want to clutter with a two-line (or line wrapped) message here again
when the commit ID and summary is mentioned a few lines above.
I actually did a quick git-log and checked that there are "Fixes." tags with
just commit IDs.

But seems that SubmittingPatches recommends 12 + Summary for Fixes as well.
Not sure. Up to Greg If he takes it or wants me to resend

-Mathias


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux