RE: [PATCH v2] usb: chipidea: host: fix port index underflow and UBSAN complains

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

 




> -----Original Message-----
> From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> Sent: Friday, June 18, 2021 3:58 PM
> To: Jun Li <jun.li@xxxxxxx>
> Cc: peter.chen@xxxxxxxxxx; stern@xxxxxxxxxxxxxxxxxxx;
> linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Zhipeng Wang
> <zhipeng.wang_1@xxxxxxx>
> Subject: Re: [PATCH v2] usb: chipidea: host: fix port index underflow and
> UBSAN complains
> 
> On Fri, Jun 18, 2021 at 09:45:09AM +0200, Greg KH wrote:
> > On Fri, Jun 18, 2021 at 03:04:39PM +0800, Li Jun wrote:
> > > If wIndex is 0 (and it often is), these calculations underflow and
> > > UBSAN complains, here resolve this by not decrementing the index
> > > when it is equal to 0, this copies the solution from commit
> > > 85e3990bea49
> > > ("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")
> > >
> > > Reported-by: zhipeng.wang <zhipeng.wang_1@xxxxxxx>
> >
> > Please use a name here that makes sense, "Zhipeng Wang"?
> 
> Specifically, the "." in the name as written originally does not make sense,
> right?

Yes, should be "Zhipeng Wang", I will change and send v3.

Thanks
Li Jun




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

  Powered by Linux