Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4648dcb2 authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

ext4: release bs.bh before re-using in ext4_xattr_block_find()



commit 45ae932d246f721e6584430017176cbcadfde610 upstream.

bs.bh was taken in previous ext4_xattr_block_find() call,
it should be released before re-using

Fixes: 7e01c8e5 ("ext3/4: fix uninitialized bs in ...")
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.26
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f0d1c16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2405,6 +2405,8 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
			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;