提交 08ff39f1 编写于 作者: S Sven Wegener 提交者: NeilBrown

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: NSven Wegener <sven.wegener@stealer.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NNeil Brown <neilb@suse.de>
上级 25570727
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册