Merge tag 'xfs-for-linus-3.17-rc1' of git://oss.sgi.com/xfs/xfs
[cascardo/linux.git] / fs / pstore / ram_core.c
index 34a1e5a..9d7b9a8 100644 (file)
@@ -394,7 +394,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size)
 
        prot = pgprot_noncached(PAGE_KERNEL);
 
-       pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL);
+       pages = kmalloc_array(page_count, sizeof(struct page *), GFP_KERNEL);
        if (!pages) {
                pr_err("%s: Failed to allocate array for %u pages\n",
                       __func__, page_count);