The patch titled Subject: mm: drop VM_BUG_ON from __get_free_pages has been added to the -mm tree. Its filename is mm-drop-vm_bug_on-from-__get_free_pages.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-drop-vm_bug_on-from-__get_free_pages.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-drop-vm_bug_on-from-__get_free_pages.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: Michal Hocko <mhocko@xxxxxxxx> Subject: mm: drop VM_BUG_ON from __get_free_pages There is no real reason to blow up just because the caller doesn't know that __get_free_pages cannot return highmem pages. Simply fix that up silently. Even if we have some confused users such a fixup will not be harmful. Link: http://lkml.kernel.org/r/20180622162841.25114-1-mhocko@xxxxxxxxxx Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Jiankang Chen <chenjiankang1@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Yisheng Xie <xieyisheng1@xxxxxxxxxx> Cc: Hanjun Guo <guohanjun@xxxxxxxxxx> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff -puN mm/page_alloc.c~mm-drop-vm_bug_on-from-__get_free_pages mm/page_alloc.c --- a/mm/page_alloc.c~mm-drop-vm_bug_on-from-__get_free_pages +++ a/mm/page_alloc.c @@ -4403,18 +4403,14 @@ out: EXPORT_SYMBOL(__alloc_pages_nodemask); /* - * Common helper functions. + * Common helper functions. Never use with __GFP_HIGHMEM because the returned + * address cannot represent highmem pages. Use alloc_pages and then kmap if + * you need to access high mem. */ unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order) { struct page *page; - /* - * __get_free_pages() returns a virtual address, which cannot represent - * a highmem page - */ - VM_BUG_ON((gfp_mask & __GFP_HIGHMEM) != 0); - page = alloc_pages(gfp_mask, order); if (!page) return 0; _ Patches currently in -mm which might be from mhocko@xxxxxxxx are mm-drop-vm_bug_on-from-__get_free_pages.patch mm-oom-docs-describe-the-cgroup-aware-oom-killer-fix-2.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html