summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSven Wegener <sven.wegener@stealer.net>2008-10-16 14:16:53 +1100
committerNeilBrown <neilb@suse.de>2008-10-16 14:16:53 +1100
commit08ff39f1c8f2134f7d0f38123ca5952371665cc5 (patch)
tree145e98a5e064143e8032f2688bfdf65d511b86a2 /drivers
parent255707274ea25d486b7de060a30ba4ac50593408 (diff)
downloadop-kernel-dev-08ff39f1c8f2134f7d0f38123ca5952371665cc5.zip
op-kernel-dev-08ff39f1c8f2134f7d0f38123ca5952371665cc5.tar.gz
md: check for memory allocation failure in faulty personality
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/faulty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index 268547d..f26c1f9 100644
--- 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);
OpenPOWER on IntegriCloud