[ 3.5.y.z extended stable ] Patch "udf: fix memory leak while allocating blocks during write" has been added to staging queue
Herton Ronaldo Krzesinski
herton.krzesinski at canonical.com
Thu Jan 10 02:39:46 UTC 2013
This is a note to let you know that I have just added a patch titled
udf: fix memory leak while allocating blocks during write
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Herton
------
>From d286d9cd7001d07b3a1781b8eac70be74da182e4 Mon Sep 17 00:00:00 2001
From: Namjae Jeon <namjae.jeon at samsung.com>
Date: Wed, 10 Oct 2012 00:08:56 +0900
Subject: [PATCH] udf: fix memory leak while allocating blocks during write
commit 2fb7d99d0de3fd8ae869f35ab682581d8455887a upstream.
Need to brelse the buffer_head stored in cur_epos and next_epos.
Signed-off-by: Namjae Jeon <namjae.jeon at samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan at samsung.com>
Signed-off-by: Jan Kara <jack at suse.cz>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
fs/udf/inode.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 873e1ba..8873c47 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -738,6 +738,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
goal, err);
if (!newblocknum) {
brelse(prev_epos.bh);
+ brelse(cur_epos.bh);
+ brelse(next_epos.bh);
*err = -ENOSPC;
return 0;
}
@@ -768,6 +770,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
udf_update_extents(inode, laarr, startnum, endnum, &prev_epos);
brelse(prev_epos.bh);
+ brelse(cur_epos.bh);
+ brelse(next_epos.bh);
newblock = udf_get_pblock(inode->i_sb, newblocknum,
iinfo->i_location.partitionReferenceNum, 0);
--
1.7.9.5
More information about the kernel-team
mailing list