Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08ff39f1 authored by Sven Wegener's avatar Sven Wegener Committed by NeilBrown
Browse files

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: default avatarSven Wegener <sven.wegener@stealer.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
parent 25570727
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);