]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Use kvmalloc_array on relocation_hashtable
authorWill Pierce <wgpierce17@gmail.com>
Wed, 2 Apr 2025 08:14:26 +0000 (01:14 -0700)
committerAlexandre Ghiti <alexghiti@rivosinc.com>
Mon, 7 Apr 2025 08:21:11 +0000 (08:21 +0000)
commit8578b2f7e1fb79d4b92b62fbbe913548bb363654
tree85916ed14a2a077748ba73a702733b15ea648a63
parent0af2f6be1b4281385b618cb86ad946eded089ac8
riscv: Use kvmalloc_array on relocation_hashtable

The number of relocations may be a huge value that is unallocatable
by kmalloc. Use kvmalloc instead so that it does not fail.

Fixes: 8fd6c5142395 ("riscv: Add remaining module relocations")
Suggested-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Will Pierce <wgpierce17@gmail.com>
Link: https://lore.kernel.org/r/20250402081426.5197-1-wgpierce17@gmail.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
arch/riscv/kernel/module.c