Re: [PATCH] xhci: Bigendian fix for xhci_check_bandwidth()

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

 



On 02/06/11 08:33, Sarah Sharp wrote:
> On Wed, Jun 01, 2011 at 03:02:35PM -0700, Sarah Sharp wrote:
>>
>> On Wed, Jun 01, 2011 at 01:01:07PM +1000, Matt Evans wrote:
>>> Commit 834cb0fc4712a3b21c6b8c5cb55bd13607191311 "xhci: Fix memory leak
>>> bug when dropping endpoints" added a small endian bug.  This patch fixes
>>> xhci_check_bandwidth() to read add/drop_flags LE.
>>>
>>> Signed-off-by: Matt Evans <matt@xxxxxxxxxx>
>>> Cc: stable@xxxxxxxxxx
>>
>> The bulk of the fixes to make the xHCI driver went into Linux 3.0, and
> 
>                     ^^^ to make the xHCI driver endian-safe
> 
>> weren't queued for the stable tree.  Is there any point in trying to
>> backport this particular fix?  I think it should only apply to 3.0.
>>
>> No need to resend the patch, I'll just remove the Cc from the final
>> version if you agree.

Good point; if they're not in stable there's little point stabling this. :(

Agreed, thanks.


Matt


>>
>> Sarah Sharp
>>
>>> ---
>>>
>>> Patch split out from superseded "xhci: Bigendian fix for skip_isoc_td() and
>>> xhci_check_bandwidth()" for stable.
>>>
>>>  drivers/usb/host/xhci.c |    4 ++--
>>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
>>> index d9660eb..ecd2021 100644
>>> --- a/drivers/usb/host/xhci.c
>>> +++ b/drivers/usb/host/xhci.c
>>> @@ -1849,8 +1849,8 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
>>>  
>>>  	/* Free any rings that were dropped, but not changed. */
>>>  	for (i = 1; i < 31; ++i) {
>>> -		if ((ctrl_ctx->drop_flags & (1 << (i + 1))) &&
>>> -				!(ctrl_ctx->add_flags & (1 << (i + 1))))
>>> +		if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) &&
>>> +		    !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1))))
>>>  			xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i);
>>>  	}
>>>  	xhci_zero_in_ctx(xhci, virt_dev);
>>> -- 
>>> 1.7.0.4
>>>
>>> --
>>> 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
>> --
>> 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

--
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