Patchwork [3.11,112/272] ext4: avoid bh leak in retry path of ext4_expand_extra_isize_ea()

login
register
mail settings
Submitter Luis Henriques
Date Dec. 6, 2013, 12:56 p.m.
Message ID <1386334761-25517-113-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/297931/
State New
Headers show

Comments

Luis Henriques - Dec. 6, 2013, 12:56 p.m.
3.11.10.1 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Theodore Ts'o <tytso@mit.edu>

commit dcb9917ba041866686fe152850364826c4622a36 upstream.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 fs/ext4/xattr.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 03e9beb..1423c48 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1352,6 +1352,7 @@  retry:
 					new_extra_isize = s_min_extra_isize;
 					kfree(is); is = NULL;
 					kfree(bs); bs = NULL;
+					brelse(bh);
 					goto retry;
 				}
 				error = -1;