Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43796 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753628AbcFEWDN (ORCPT ); Sun, 5 Jun 2016 18:03:13 -0400 Subject: Patch "Btrfs: fix fspath error deallocation" has been added to the 4.5-stable tree To: vincent.stehle@intel.com, dsterba@suse.com, gregkh@linuxfoundation.org Cc: , From: Date: Sun, 05 Jun 2016 14:48:20 -0700 Message-ID: <1465163300205231@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Btrfs: fix fspath error deallocation to the 4.5-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: btrfs-fix-fspath-error-deallocation.patch and it can be found in the queue-4.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 72928f2476d08c79f132b4f44a17c9a011dd98e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Tue, 10 May 2016 14:56:20 +0200 Subject: Btrfs: fix fspath error deallocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Vincent Stehlé commit 72928f2476d08c79f132b4f44a17c9a011dd98e3 upstream. Make sure to deallocate fspath with vfree() in case of error in init_ipath(). fspath is allocated with vmalloc() in init_data_container() since commit 425d17a290c0 ("Btrfs: use larger limit for translation of logical to inode"). Signed-off-by: Vincent Stehlé Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1995,7 +1995,7 @@ struct inode_fs_paths *init_ipath(s32 to ifp = kmalloc(sizeof(*ifp), GFP_NOFS); if (!ifp) { - kfree(fspath); + vfree(fspath); return ERR_PTR(-ENOMEM); } Patches currently in stable-queue which might be from vincent.stehle@intel.com are queue-4.5/btrfs-fix-fspath-error-deallocation.patch