[PATCH 4/4] reiser4: fixed null pointer dereference

From: Johannes Buchner
Date: Sat Nov 28 2009 - 01:28:23 EST


The parameter wbc=NULL caused a NULL pointer dereference in
reiser4_sync_inodes.
This issue was introduced in patch reiser4-vfs-add-super_operationssync_inodes
---
fs/reiser4/super_ops.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/reiser4/super_ops.c b/fs/reiser4/super_ops.c
index 0c09e3e..f72d42a 100644
--- a/fs/reiser4/super_ops.c
+++ b/fs/reiser4/super_ops.c
@@ -395,7 +395,7 @@ static void reiser4_sync_inodes(struct super_block *super,
reiser4_context *ctx;
long to_write;

- if (wbc->for_kupdate)
+ if (wbc == NULL || wbc->for_kupdate)
/* reiser4 has its own means of periodical write-out */
return;

--
1.6.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/