Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.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);