Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Alan Stern
On Sun, 23 Apr 2017, Florian Fainelli wrote: > > In that case, it would be better to move the warning to a central place > > where it will always get triggered, such as map_urb_for_dma(). As it > > is, the patch will only issue a warning for callers of usb_bulk_msg(), > > usb_interrupt_msg(), or

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Florian Fainelli
On 04/23/2017 09:01 AM, Alan Stern wrote: > On Sun, 23 Apr 2017, Greg Kroah-Hartman wrote: > >> On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: >>> On Sat, 22 Apr 2017, Florian Fainelli wrote: >>> We see a large number of fixes to several drivers to remove the usage of

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Alan Stern
On Sun, 23 Apr 2017, Greg Kroah-Hartman wrote: > On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: > > On Sat, 22 Apr 2017, Florian Fainelli wrote: > > > > > We see a large number of fixes to several drivers to remove the usage of > > > on-stack buffers feeding into USB transfer

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-23 Thread Greg Kroah-Hartman
On Sat, Apr 22, 2017 at 05:31:27PM -0400, Alan Stern wrote: > On Sat, 22 Apr 2017, Florian Fainelli wrote: > > > We see a large number of fixes to several drivers to remove the usage of > > on-stack buffers feeding into USB transfer functions. Make it easier to spot > > the offenders by adding a

Re: [PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-22 Thread Alan Stern
On Sat, 22 Apr 2017, Florian Fainelli wrote: > We see a large number of fixes to several drivers to remove the usage of > on-stack buffers feeding into USB transfer functions. Make it easier to spot > the offenders by adding a warning in usb_start_wait_urb() for > urb->transfer_buffer to be

[PATCH] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-22 Thread Florian Fainelli
We see a large number of fixes to several drivers to remove the usage of on-stack buffers feeding into USB transfer functions. Make it easier to spot the offenders by adding a warning in usb_start_wait_urb() for urb->transfer_buffer to be located on the stack. Signed-off-by: Florian Fainelli