mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Mainline: 17fc8084aa8f9d5235f252fc3978db657dd77e92
From: v6.7-rc1
Severity: Low
[ Upstream commit 17fc8084aa8f9d5235f252fc3978db657dd77e92 ]
We consistently switched from kmalloc() to vmalloc() in module
decompression to prevent potential memory allocation failures with large
modules, however vmalloc() is not as memory-efficient and fast as
kmalloc().
Since we don't know in general the size of the workspace required by the
decompression algorithm, it is more reasonable to use kvmalloc()
consistently, also considering that we don't have special memory
requirements here.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(backported from commit ada57fd312)
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Change-Id: I8dbe27560b41af5f4f5d34858ff40c4cdf3e041e
Reviewed-on: http://gerrit.kylin.com/c/klinux/+/84078
Tested-by: k2ci <kernel-bot@kylinos.cn>