projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2557072
)
md: check for memory allocation failure in faulty personality
author
Sven Wegener
<sven.wegener@stealer.net>
Thu, 16 Oct 2008 03:16:53 +0000
(14:16 +1100)
committer
NeilBrown
<neilb@suse.de>
Thu, 16 Oct 2008 03:16:53 +0000
(14:16 +1100)
It's a fault injection module, but I don't think we should oops here.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Neil Brown <neilb@suse.de>
drivers/md/faulty.c
patch
|
blob
|
history
diff --git
a/drivers/md/faulty.c
b/drivers/md/faulty.c
index
268547d
..
f26c1f9
100644
(file)
--- a/
drivers/md/faulty.c
+++ b/
drivers/md/faulty.c
@@
-287,6
+287,8
@@
static int run(mddev_t *mddev)
int i;
conf_t *conf = kmalloc(sizeof(*conf), GFP_KERNEL);
+ if (!conf)
+ return -ENOMEM;
for (i=0; i<Modes; i++) {
atomic_set(&conf->counters[i], 0);