* [PATCH] Add missing brelse to xattr code.
@ 2013-11-06 15:45 Dave Jones
2013-11-12 1:08 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2013-11-06 15:45 UTC (permalink / raw)
To: linux-ext4
This code was recently patched to not leak memory on the retry path,
but it seems we are also forgetting to brelse the bufferhead.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 03e9bebba198..1423c4816a47 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Add missing brelse to xattr code.
2013-11-06 15:45 [PATCH] Add missing brelse to xattr code Dave Jones
@ 2013-11-12 1:08 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2013-11-12 1:08 UTC (permalink / raw)
To: Dave Jones; +Cc: linux-ext4
On Wed, Nov 06, 2013 at 10:45:46AM -0500, Dave Jones wrote:
> This code was recently patched to not leak memory on the retry path,
> but it seems we are also forgetting to brelse the bufferhead.
>
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
Thanks, I have this fix in my tree already.
Cheers,
- Ted
commit dcb9917ba041866686fe152850364826c4622a36
Author: Theodore Ts'o <tytso@mit.edu>
Date: Thu Oct 31 23:00:24 2013 -0400
ext4: avoid bh leak in retry path of ext4_expand_extra_isize_ea()
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-12 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 15:45 [PATCH] Add missing brelse to xattr code Dave Jones
2013-11-12 1:08 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).