]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
lib/genalloc.c: use vzalloc_node() to allocate the bitmap
authorHuang Shijie <sjhuang@iluvatar.ai>
Thu, 3 Jan 2019 23:26:51 +0000 (15:26 -0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:38 +0000 (14:21 -0300)
commit298a61e2c5946191a05df9eaa997e141a8a25fe1
tree1be2678a33d67cf451d5a3fef2c306393548447c
parenta1a27629d91af5a74250c08a23e79a2923cfd073
lib/genalloc.c: use vzalloc_node() to allocate the bitmap

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 6862d2fc81859f88c1f3f660886427893f2b4f3f ]

Some devices may have big memory on chip, such as over 1G.  In some
cases, the nbytes maybe bigger then 4M which is the bounday of the
memory buddy system (4K default).

So use vzalloc_node() to allocate the bitmap.  Also use vfree to free
it.

Link: http://lkml.kernel.org/r/20181225015701.6289-1-sjhuang@iluvatar.ai
Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Skidanov <alexey.skidanov@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
lib/genalloc.c