diff options
author | 2022-05-22 23:03:29 +0200 | |
---|---|---|
committer | 2022-05-22 23:03:29 +0200 | |
commit | da50aad6d86716aa48a2b8463c85caea77c0355f (patch) | |
tree | c9604cc380e99e613c25ec06cbfcd5009c4575ba /mm/util.c | |
parent | power: supply: bq24190_charger: using pm_runtime_resume_and_get instead of pm_runtime_get_sync (diff) | |
parent | power: supply: ab8500_fg: Allocate wq in probe (diff) | |
download | wireguard-linux-da50aad6d86716aa48a2b8463c85caea77c0355f.tar.xz wireguard-linux-da50aad6d86716aa48a2b8463c85caea77c0355f.zip |
Merge power-supply 'fixes' branch
Merge power-supply fixes, that missed the v5.18 merge window
into power-supply's for-next branch.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
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); |