]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mm: vmalloc: introduce array allocation functions
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 09:47:22 +0000 (04:47 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:52:12 +0000 (10:52 +0200)
commit5499067564c3be46ab50d6fea44c10317a8e6edf
tree76a87f69d6fa1841003ca146c4429482b340a66c
parent57731f67bccbbfade481b9f7c96c0bf726bb2028
mm: vmalloc: introduce array allocation functions

BugLink: https://bugs.launchpad.net/bugs/1987451
[ Upstream commit a8749a35c39903120ec421ef2525acc8e0daa55c ]

Linux has dozens of occurrences of vmalloc(array_size()) and
vzalloc(array_size()).  Allow to simplify the code by providing
vmalloc_array and vcalloc, as well as the underscored variants that let
the caller specify the GFP flags.

Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/linux/vmalloc.h
mm/util.c