lkml.org 
[lkml]   [2016]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence
From
Date
Hi,

On Tue, 2016-04-26 at 16:11 -0700, Greg Kroah-Hartman wrote:
> On Fri, Apr 08, 2016 at 11:21:05AM -0400, Alan Stern wrote:
> > On Fri, 8 Apr 2016, 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?
> > >
> > > Shouldn't we fix that issue instead?
> >
> > And even if a driver does want to allocate a 0-length buffer, shouldn't
> > the function simply return early instead of running through all its
> > calculations?
>
> Yes it should, Chunfeng, can you fix this patch to do that please.
>
Ok, I will fix it later

> thanks,
>
> greg k-h


\
 
 \ /
  Last update: 2016-04-27 04:01    [W:0.884 / U:1.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site