mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-18 02:24:21 +08:00
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>
This commit is contained in:
parent
255707274e
commit
08ff39f1c8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user