diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-05 22:09:35 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-05 22:09:35 +1000 |
commit | d0a31acc34dc2921ad32a67a7534704114e64f82 (patch) | |
tree | 2b77d8d61170c5f9633c49eaddd67dca5bb9c38f /mm/util.c | |
parent | f06351f8c0c85e2d53e73c53a33b4ef55b4ad6de (diff) | |
parent | af2d861d4cd2a4da5137f795ee3509e6f944a25b (diff) | |
download | linux-d0a31acc34dc2921ad32a67a7534704114e64f82.tar.gz linux-d0a31acc34dc2921ad32a67a7534704114e64f82.tar.bz2 linux-d0a31acc34dc2921ad32a67a7534704114e64f82.zip |
Merge tag 'v5.18-rc4' into next
Merge master into next, to bring in commit 5f24d5a579d1 ("mm, hugetlb:
allow for "high" userspace addresses"), which is needed as a
prerequisite for the series converting powerpc to the generic mmap
logic.
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/util.c b/mm/util.c index 54e5e761a9a9..3492a9e81aa3 100644 --- a/mm/util.c +++ b/mm/util.c @@ -592,8 +592,15 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) return NULL; } - return __vmalloc_node(size, 1, flags, node, - __builtin_return_address(0)); + /* + * kvmalloc() can always use VM_ALLOW_HUGE_VMAP, + * since the callers already cannot assume anything + * about the resulting pointer, and cannot play + * protection games. + */ + return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END, + flags, PAGE_KERNEL, VM_ALLOW_HUGE_VMAP, + node, __builtin_return_address(0)); } EXPORT_SYMBOL(kvmalloc_node); |