diff options
author | Charlie Jenkins <[email protected]> | 2024-01-04 11:42:49 -0800 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2024-01-10 06:48:13 -0800 |
commit | a35551c7244d9d061643a01eb96cc3ba04eaf45c (patch) | |
tree | 87015a09df705eb394cdfff2423264338c171e9f | |
parent | 4b38b36bfbd83b23e20c172d08dd85773791e3bd (diff) |
riscv: Fix relocation_hashtable size
A second dereference is needed to get the accurate size of the
relocation_hashtable.
Signed-off-by: Charlie Jenkins <[email protected]>
Fixes: d8792a5734b0 ("riscv: Safely remove entries from relocation list")
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r-- | arch/riscv/kernel/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index 32743180e8ef..ceb0adb38715 100644 --- a/arch/riscv/kernel/module.c +++ b/arch/riscv/kernel/module.c @@ -764,7 +764,7 @@ initialize_relocation_hashtable(unsigned int num_relocations, hashtable_size <<= should_double_size; *relocation_hashtable = kmalloc_array(hashtable_size, - sizeof(*relocation_hashtable), + sizeof(**relocation_hashtable), GFP_KERNEL); if (!*relocation_hashtable) return 0; |