This is a note to let you know that I've just added the patch titled btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod to the 5.9-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-ref-verify-fix-memory-leak-in-btrfs_ref_tree_mod.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 468600c6ec28613b756193c5f780aac062f1acdf Mon Sep 17 00:00:00 2001 From: Dinghao Liu <dinghao.liu@xxxxxxxxxx> Date: Wed, 21 Oct 2020 13:36:55 +0800 Subject: btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod From: Dinghao Liu <dinghao.liu@xxxxxxxxxx> commit 468600c6ec28613b756193c5f780aac062f1acdf upstream. There is one error handling path that does not free ref, which may cause a minor memory leak. CC: stable@xxxxxxxxxxxxxxx # 4.19+ Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx> Reviewed-by: David Sterba <dsterba@xxxxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/ref-verify.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/btrfs/ref-verify.c +++ b/fs/btrfs/ref-verify.c @@ -860,6 +860,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_i "dropping a ref for a root that doesn't have a ref on the block"); dump_block_entry(fs_info, be); dump_ref_action(fs_info, ra); + kfree(ref); kfree(ra); goto out_unlock; } Patches currently in stable-queue which might be from dinghao.liu@xxxxxxxxxx are queue-5.9/btrfs-ref-verify-fix-memory-leak-in-btrfs_ref_tree_mod.patch