From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Sun, 1 Oct 2017 21:18:42 +0800 Subject: [U-Boot] [PATCH] usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk() In-Reply-To: <2ac309dd-6ed9-e188-a761-d2e5b3555927@denx.de> References: <1506574207-28971-1-git-send-email-bmeng.cn@gmail.com> <3de48db9-ed77-4d9f-8d87-7cf31c5a7881@denx.de> <2ac309dd-6ed9-e188-a761-d2e5b3555927@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, On Fri, Sep 29, 2017 at 5:36 PM, Marek Vasut wrote: > On 09/29/2017 11:26 AM, Bin Meng wrote: >> Hi Marek, >> >> On Fri, Sep 29, 2017 at 10:30 AM, Marek Vasut wrote: >>> On 09/29/2017 01:36 AM, Bin Meng wrote: >>>> Hi Marek, >>>> >>>> On Thu, Sep 28, 2017 at 11:24 PM, Marek Vasut 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 >>>>> >>>>> 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! > I just sent additional patches (http://patchwork.ozlabs.org/project/uboot/list/?series=5892) to fix the 'make tests' issues. Please do the following on the u-boot-usb/master branch: 1). Drop http://git.denx.de/?p=u-boot/u-boot-usb.git;a=commit;h=198db64035a589ef19920b2cec58419b4b338ce7 2). Drop http://git.denx.de/?p=u-boot/u-boot-usb.git;a=commit;h=9a462a3af216d77fee689f119419506218531f77 3). Apply http://patchwork.ozlabs.org/project/uboot/list/?series=5892 on top of u-boot-usb/master Then everything should be fine. Regards, Bin