Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-6961 ldiskfs: buffer head leak in mmp
[fs/lustre-release.git]
/
ldiskfs
/
kernel_patches
/
patches
/
rhel6.3
/
ext4-mmp.patch
diff --git
a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mmp.patch
b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mmp.patch
index
3221b25
..
5ce0da8
100644
(file)
--- a/
ldiskfs/kernel_patches/patches/rhel6.3/ext4-mmp.patch
+++ b/
ldiskfs/kernel_patches/patches/rhel6.3/ext4-mmp.patch
@@
-156,7
+156,7
@@
Index: linux-stage/fs/ext4/mmp.c
===================================================================
--- /dev/null
+++ linux-stage/fs/ext4/mmp.c
===================================================================
--- /dev/null
+++ linux-stage/fs/ext4/mmp.c
-@@ -0,0 +1,35
6
@@
+@@ -0,0 +1,35
7
@@
+#include <linux/fs.h>
+#include <linux/random.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+#include <linux/random.h>
+#include <linux/buffer_head.h>
@@
-220,6
+220,7
@@
Index: linux-stage/fs/ext4/mmp.c
+ mmp = (struct mmp_struct *)((*bh)->b_data);
+ if (le32_to_cpu(mmp->mmp_magic) != EXT4_MMP_MAGIC) {
+ brelse(*bh);
+ mmp = (struct mmp_struct *)((*bh)->b_data);
+ if (le32_to_cpu(mmp->mmp_magic) != EXT4_MMP_MAGIC) {
+ brelse(*bh);
++ *bh = NULL;
+ return -EINVAL;
+ }
+
+ return -EINVAL;
+ }
+