Skip to content
Commit ada57fd3 authored by Andrea Righi's avatar Andrea Righi Committed by Greg Kroah-Hartman
Browse files

module/decompress: use kvmalloc() consistently

[ Upstream commit 17fc8084

 ]

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Tested-by: default avatarAndrea Righi <andrea.righi@canonical.com>
Signed-off-by: default avatarAndrea Righi <andrea.righi@canonical.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 85be1a73
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment