Patch "btrfs: fix memory leak in update_space_info failure path" has been added to the 4.11-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
btrfs: fix memory leak in update_space_info failure path
to the 4.11-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-memory-leak-in-update_space_info-failure-path.patch
and it can be found in the queue-4.11 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
896533a7da929136d0432713f02a3edffece2826Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <[email protected]>
Date: Wed, 17 May 2017 09:49:37 -0400
Subject: btrfs: fix memory leak in update_space_info failure path
From: Jeff Mahoney <[email protected]>
commit 896533a7da929136d0432713f02a3edffece2826 upstream.
If we fail to add the space_info kobject, we'll leak the memory for the percpu counter.
--- fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+)
fs/btrfs/extent-tree.c +1 -0
@@ -3983,6 +3983,7 @@ static int update_space_info(struct btrf info->space_info_kobj,"%s" , alloc_name(found->flags));if (ret) { +percpu_counter_destroy (&found->total_bytes_pinned);kfree (found);return ret; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.11/btrfs-fix-memory-leak-in-update_space_info-failure-path.patch queue-4.11/btrfs-fix-race-with-relocation-recovery-and-fs_root-setup.patch