From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033756AbdD0J5c (ORCPT ); Thu, 27 Apr 2017 05:57:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59090 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937029AbdD0J50 (ORCPT ); Thu, 27 Apr 2017 05:57:26 -0400 Date: Thu, 27 Apr 2017 11:57:16 +0200 From: Greg KH To: Arnd Bergmann Cc: stable@vger.kernel.org, Felipe Balbi , Bin Liu , Sasha Levin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH, 3.18-stable regression] gadgetfs: fix uninitialized variable in error handling Message-ID: <20170427095716.GC1755@kroah.com> References: <20170421130623.2668561-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421130623.2668561-1-arnd@arndb.de> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2017 at 03:06:12PM +0200, Arnd Bergmann wrote: > gcc warns about a bug in 3.18.y: > > drivers/usb/gadget/legacy/inode.c:648:10: warning: 'value' may be used > > This is caused by the backport of f01d35a15fa0416 from 4.0 to 3.18: > c81fc59be42c6e0 gadgetfs: use-after-free in ->aio_read() > > The backported patch was buggy, but the mainline code was rewritten > in a larger patch directly following this one in a way that fixed the > bug. > > For stable, we should need only a one-line change to make sure we > return an proper error code. It is very unlikely that anybody ever > ran into the out-of-memory case here in practice, but the compiler > is right in theory. > > Fixes: c81fc59be42c ("gadgetfs: use-after-free in ->aio_read()") > Signed-off-by: Arnd Bergmann > --- > drivers/usb/gadget/legacy/inode.c | 1 + > 1 file changed, 1 insertion(+) Now queued up, thanks! greg k-h