[PATCH] usb: core: buffer: avoid NULL pointer dereferrence

chunfeng yun chunfeng.yun at mediatek.com
Sun Apr 10 20:01:45 PDT 2016

On Fri, 2016-04-08 at 07:07 -0700, Greg Kroah-Hartman wrote:
> On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote:
> > NULL pointer dereferrence will happen when class driver
> > wants to allocate zero length buffer and pool_max[0]
> > can't be used, so skip reserved pool in this case.
> Why would a driver want to allocate a 0 length buffer?  What driver does
> this?
It's misc/usbtest.c
> Shouldn't we fix that issue instead?
I don't know which way is better, but it seems simple to fix it up in
> thanks,
> greg k-h

More information about the linux-arm-kernel mailing list