OSDN Git Service

btrfs: Exit gracefully when chunk map cannot be inserted to the tree
[android-x86/kernel.git] / fs / binfmt_elf_fdpic.c
index d90993a..b53bb37 100644 (file)
@@ -1600,7 +1600,8 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
        psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL);
        if (!psinfo)
                goto cleanup;
-       notes = kmalloc(NUM_NOTES * sizeof(struct memelfnote), GFP_KERNEL);
+       notes = kmalloc_array(NUM_NOTES, sizeof(struct memelfnote),
+                             GFP_KERNEL);
        if (!notes)
                goto cleanup;
        fpu = kmalloc(sizeof(*fpu), GFP_KERNEL);