Skip to contentSkip to conversation

Patch "Btrfs: fix fspath error deallocation" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Jun 5, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From 72928f2476d08c79f132b4f44a17c9a011dd98e3 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <[email protected]>
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é <[email protected]>

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").

---
 fs/btrfs/backref.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/backref.c +1 -1
@@ -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 [email protected] are

queue-4.5/btrfs-fix-fspath-error-deallocation.patch