FAILED: patch "[PATCH] ext4: fix possible memory leak in ext4_remount()" failed to apply to 3.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch below does not apply to the 3.8-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@xxxxxxxxxxxxxxx>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From 3e36a16375eee390a9d80f99499fe630efa08128 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
Date: Sat, 2 Mar 2013 17:13:55 -0500
Subject: [PATCH] ext4: fix possible memory leak in ext4_remount()

'orig_data' is malloced in ext4_remount() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 1ae5860..6ac9c8a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4543,6 +4543,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 			if (!old_opts.s_qf_names[i]) {
 				for (j = 0; j < i; j++)
 					kfree(old_opts.s_qf_names[j]);
+				kfree(orig_data);
 				return -ENOMEM;
 			}
 		} else

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]