[PATCH] reiserfs missing kmalloc failure check

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

 



According to http://bugzilla.kernel.org/show_bug.cgi?id=5778
fs/reiserfs/file.c is missing this check?


Signed-off-by: Diego Calleja <[email protected]>

Index: test/fs/reiserfs/file.c
===================================================================
--- test.orig/fs/reiserfs/file.c	2006-01-13 02:40:50.000000000 +0100
+++ test/fs/reiserfs/file.c	2006-01-16 01:41:36.000000000 +0100
@@ -192,6 +192,8 @@
 
 	allocated_blocks = kmalloc((blocks_to_allocate + will_prealloc) *
 				   sizeof(b_blocknr_t), GFP_NOFS);
+	if (!allocated_blocks)
+		return -ENOMEM;
 
 	/* First we compose a key to point at the writing position, we want to do
 	   that outside of any locking region. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux