[U-Boot] [PATCH] usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk()

Marek Vasut marex at denx.de
Fri Sep 29 09:36:52 UTC 2017


On 09/29/2017 11:26 AM, Bin Meng wrote:
> Hi Marek,
> 
> On Fri, Sep 29, 2017 at 10:30 AM, Marek Vasut <marex at denx.de> wrote:
>> On 09/29/2017 01:36 AM, Bin Meng wrote:
>>> Hi Marek,
>>>
>>> On Thu, Sep 28, 2017 at 11:24 PM, Marek Vasut <marex at denx.de> wrote:
>>>> On 09/28/2017 06:50 AM, Bin Meng wrote:
>>>>> The stored 'blk' value is overwritten to 'size / 512' before it can
>>>>> be used in usb_stor_set_max_xfer_blk(). This is not what we want.
>>>>> In fact, when 'size' exceeds the upper limit (USHRT_MAX * 512), we
>>>>> should simply assign 'size' to the upper limit.
>>>>>
>>>>> Reported-by: Coverity (CID: 167250)
>>>>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>>>>
>>>> Still failing
>>>> https://travis-ci.org/marex/u-boot-usb/builds/280835848
>>>>
>>>
>>> This fixes the Coverity issue, not the 'make tests' issue. Please hold
>>> on apply the xHCI patchset and when the fix is ready I will send v2.
>>
>> Can't you send me fix on top of current set ? If not, OK, tell me what
>> to drop and what to pick.
>>
> 
> OK, will do.

Thanks!

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list