From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:43502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752980AbeD3SY6 (ORCPT ); Mon, 30 Apr 2018 14:24:58 -0400 Date: Mon, 30 Apr 2018 11:24:48 -0700 From: Greg Kroah-Hartman To: Bin Liu , linux-usb@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/2] usb: musb: host: fix potential NULL pointer dereference Message-ID: <20180430182448.GA21778@kroah.com> References: <1525105254-2852-1-git-send-email-b-liu@ti.com> <1525105254-2852-2-git-send-email-b-liu@ti.com> <20180430164215.GA17510@kroah.com> <20180430181134.GB21238@uda0271908> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180430181134.GB21238@uda0271908> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Apr 30, 2018 at 01:11:34PM -0500, Bin Liu wrote: > On Mon, Apr 30, 2018 at 09:42:15AM -0700, Greg Kroah-Hartman wrote: > > On Mon, Apr 30, 2018 at 11:20:53AM -0500, Bin Liu wrote: > > > musb_start_urb() doesn't check the pass-in parameter if it is NULL. But > > > in musb_bulk_nak_timeout() the parameter passed to musb_start_urb() is > > > returned from first_qh(), which could be NULL. > > > > > > So wrap the musb_start_urb() call here with a if condition check to > > > avoid the potential NULL pointer dereference. > > > > > > Fixes: f283862f3b5cb("usb: musb: NAK timeout scheme on bulk TX endpoint") > > > > Nit, you forgot a ' ', this should be: > > f283862f3b5c ("usb: musb: NAK timeout scheme on bulk TX endpoint") > > Sorry, thanks. > > > You also had one extra id value in there, odd. I'll edit this by > > Not sure why 'git blame' gives that one extra on my computer. I will see > if I will figure it out... Why use 'git blame'? I use: git show -s --abbrev-commit --abbrev=12 --pretty=format:"%h (\"%s\")%n" to generate these types of lines. thanks, greg k-h