]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/huge_memory.c
x86/events/intel/ds: Fix bts_interrupt_threshold alignment
[linux.git] / mm / huge_memory.c
index ba8fdc0b6e7f712104e076244dc6def9ab2aa097..1cd7c1a57a144320b7d1729d7caa6ec93351cc54 100644 (file)
@@ -1131,8 +1131,8 @@ static int do_huge_pmd_wp_page_fallback(struct vm_fault *vmf, pmd_t orig_pmd,
        unsigned long mmun_start;       /* For mmu_notifiers */
        unsigned long mmun_end;         /* For mmu_notifiers */
 
-       pages = kmalloc(sizeof(struct page *) * HPAGE_PMD_NR,
-                       GFP_KERNEL);
+       pages = kmalloc_array(HPAGE_PMD_NR, sizeof(struct page *),
+                             GFP_KERNEL);
        if (unlikely(!pages)) {
                ret |= VM_FAULT_OOM;
                goto out;