From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60208 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752382AbdD0KEi (ORCPT ); Thu, 27 Apr 2017 06:04:38 -0400 Subject: Patch "gadgetfs: fix uninitialized variable in error handling" has been added to the 3.18-stable tree To: arnd@arndb.de, b-liu@ti.com, balbi@ti.com, gregkh@linuxfoundation.org, sasha.levin@oracle.com Cc: , From: Date: Thu, 27 Apr 2017 12:04:12 +0200 In-Reply-To: <20170421130623.2668561-1-arnd@arndb.de> Message-ID: <149328745214922@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled gadgetfs: fix uninitialized variable in error handling to the 3.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: gadgetfs-fix-uninitialized-variable-in-error-handling.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From arnd@arndb.de Thu Apr 27 11:56:31 2017 From: Arnd Bergmann Date: Fri, 21 Apr 2017 15:06:12 +0200 Subject: gadgetfs: fix uninitialized variable in error handling To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, Arnd Bergmann , Felipe Balbi , Bin Liu , Sasha Levin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20170421130623.2668561-1-arnd@arndb.de> From: Arnd Bergmann 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/legacy/inode.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c @@ -654,6 +654,7 @@ fail: GFP_KERNEL); if (!priv->iv) { kfree(priv); + value = -ENOMEM; goto fail; } } Patches currently in stable-queue which might be from arnd@arndb.de are queue-3.18/acpi-power-avoid-maybe-uninitialized-warning.patch queue-3.18/gadgetfs-fix-uninitialized-variable-in-error-handling.patch queue-3.18/clk-at91-usb-fix-determine_rate-prototype-again.patch queue-3.18/arm-psci-fix-header-file.patch queue-3.18/dm-bufio-hide-bogus-warning.patch