The patch titled Subject: mm-vmalloc-allocate-small-pages-for-area-pages-fix has been added to the -mm tree. Its filename is mm-vmalloc-allocate-small-pages-for-area-pages-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-vmalloc-allocate-small-pages-for-area-pages-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-allocate-small-pages-for-area-pages-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-vmalloc-allocate-small-pages-for-area-pages-fix tweak code layout Cc: Xu Yu <xuyu@xxxxxxxxxxxxxxxxx> Cc: Uladzislau Rezki <uladzislau.rezki@xxxxxxxx> Cc: Nicholas Piggin <npiggin@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/mm/vmalloc.c~mm-vmalloc-allocate-small-pages-for-area-pages-fix +++ a/mm/vmalloc.c @@ -2927,12 +2927,14 @@ static void *__vmalloc_area_node(struct unsigned long addr = (unsigned long)area->addr; unsigned long size = get_vm_area_size(area); unsigned long array_size; - unsigned int nr_small_pages = size >> PAGE_SHIFT; - unsigned int max_small_pages = ALIGN(size, 1UL << page_shift) >> PAGE_SHIFT; + unsigned int nr_small_pages, max_small_pages; unsigned int page_order; unsigned int flags; int ret; + nr_small_pages = size >> PAGE_SHIFT; + max_small_pages = ALIGN(size, 1UL << page_shift) >> PAGE_SHIFT; + array_size = (unsigned long)max_small_pages * sizeof(struct page *); gfp_mask |= __GFP_NOWARN; if (!(gfp_mask & (GFP_DMA | GFP_DMA32))) _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are mm-bdi-initialize-bdi_min_ratio-when-bdi-unregister-fix.patch shmem-fix-a-race-between-shmem_unused_huge_shrink-and-shmem_evict_inode-checkpatch-fixes.patch kthread-add-the-helper-function-kthread_run_on_cpu-fix.patch mm.patch kmemleak-fix-kmemleak-false-positive-report-with-hw-tag-based-kasan-enable-fix.patch device-dax-remove-pfn-from-__dev_dax_ptepmdpud_fault-fix.patch mm-shmem-dont-truncate-page-if-memory-failure-happens-checkpatch-fixes.patch mm-remove-redundant-check-about-fault_flag_allow_retry-bit-checkpatch-fixes.patch mm-vmalloc-allocate-small-pages-for-area-pages-fix.patch mm-mempolicy-convert-from-atomic_t-to-refcount_t-on-mempolicy-refcnt-fix.patch mm-memcg-percpu-account-extra-objcg-space-to-memory-cgroups-fix.patch mm-rmap-fix-potential-batched-tlb-flush-race-fix.patch proc-make-the-proc_create-stubs-static-inlines-fix.patch proc-make-the-proc_create-stubs-static-inlines-fix2.patch proc-make-the-proc_create-stubs-static-inlines-fix2-fix.patch panic-use-error_report_end-tracepoint-on-warnings-fix.patch linux-next-rejects.patch sysctl-move-some-boundary-constants-from-sysctlc-to-sysctl_vals-fix.patch firmware_loader-move-firmware-sysctl-to-its-own-files-fix.patch firmware_loader-move-firmware-sysctl-to-its-own-files-fix-fix.patch sysctl-add-helper-to-register-a-sysctl-mount-point-fix.patch proc-remove-pde_data-completely-fix.patch proc-remove-pde_data-completely-fix-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch