This is a note to let you know that I've just added the patch titled ext4: release bs.bh before re-using in ext4_xattr_block_find() to the 4.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: ext4-release-bs.bh-before-re-using-in-ext4_xattr_block_find.patch and it can be found in the queue-4.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 45ae932d246f721e6584430017176cbcadfde610 Mon Sep 17 00:00:00 2001 From: Vasily Averin <vvs@xxxxxxxxxxxxx> Date: Wed, 7 Nov 2018 11:07:01 -0500 Subject: ext4: release bs.bh before re-using in ext4_xattr_block_find() From: Vasily Averin <vvs@xxxxxxxxxxxxx> commit 45ae932d246f721e6584430017176cbcadfde610 upstream. bs.bh was taken in previous ext4_xattr_block_find() call, it should be released before re-using Fixes: 7e01c8e5420b ("ext3/4: fix uninitialized bs in ...") Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Cc: stable@xxxxxxxxxx # 2.6.26 Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/xattr.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1221,6 +1221,8 @@ ext4_xattr_set_handle(handle_t *handle, error = ext4_xattr_block_set(handle, inode, &i, &bs); } else if (error == -ENOSPC) { if (EXT4_I(inode)->i_file_acl && !bs.s.base) { + brelse(bs.bh); + bs.bh = NULL; error = ext4_xattr_block_find(inode, &i, &bs); if (error) goto cleanup; Patches currently in stable-queue which might be from vvs@xxxxxxxxxxxxx are queue-4.9/ext4-add-missing-brelse-add_new_gdb_meta_bg-s-error-path.patch queue-4.9/ext4-avoid-buffer-leak-in-ext4_orphan_add-after-prior-errors.patch queue-4.9/ext4-release-bs.bh-before-re-using-in-ext4_xattr_block_find.patch queue-4.9/ext4-fix-missing-cleanup-if-ext4_alloc_flex_bg_array-fails-while-resizing.patch queue-4.9/ext4-fix-buffer-leak-in-__ext4_read_dirblock-on-error-path.patch queue-4.9/ext4-fix-possible-inode-leak-in-the-retry-loop-of-ext4_resize_fs.patch queue-4.9/ext4-fix-possible-leak-of-sbi-s_group_desc_leak-in-error-path.patch queue-4.9/ext4-add-missing-brelse-in-set_flexbg_block_bitmap-s-error-path.patch queue-4.9/ext4-fix-buffer-leak-in-ext4_xattr_move_to_block-on-error-path.patch queue-4.9/ext4-avoid-potential-extra-brelse-in-setup_new_flex_group_blocks.patch queue-4.9/ext4-add-missing-brelse-update_backups-s-error-path.patch queue-4.9/ext4-avoid-possible-double-brelse-in-add_new_gdb-on-error-path.patch queue-4.9/ext4-fix-possible-leak-of-s_journal_flag_rwsem-in-error-path.patch