Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374308

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

From Alan Stern <stern@rowland.harvard.edu>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence
Date 2016-04-08 17:30 +0200
Message-ID <rlGwa-5UD-25@gated-at.bofh.it> (permalink)
References <rlFgK-4ZO-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

Alan Stern

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] usb: core: buffer: avoid NULL pointer dereferrence Chunfeng Yun <chunfeng.yun@mediatek.com> - 2016-04-08 11:10 +0200
  Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-08 16:10 +0200
    Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Alan Stern <stern@rowland.harvard.edu> - 2016-04-08 17:30 +0200
    Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence chunfeng yun <chunfeng.yun@mediatek.com> - 2016-04-11 05:10 +0200
      Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-04-11 07:20 +0200
        Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence chunfeng yun <chunfeng.yun@mediatek.com> - 2016-04-11 09:20 +0200
          Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-04-11 10:30 +0200
          Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Alan Stern <stern@rowland.harvard.edu> - 2016-04-11 16:50 +0200

csiph-web