From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence Date: Fri, 8 Apr 2016 07:07:01 -0700 Message-ID: <20160408140701.GA3547@kroah.com> References: <1460106483-24793-1-git-send-email-chunfeng.yun@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1460106483-24793-1-git-send-email-chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Chunfeng Yun Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-mediatek@lists.infradead.org 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? thanks, greg k-h