This is a note to let you know that I've just added the patch titled riscv: Fix relocation_hashtable size to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: riscv-fix-relocation_hashtable-size.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 462fae6542a015e24de1c01a35c29461c722ddd7 Author: Charlie Jenkins <charlie@xxxxxxxxxxxx> Date: Thu Jan 4 11:42:49 2024 -0800 riscv: Fix relocation_hashtable size [ Upstream commit a35551c7244d9d061643a01eb96cc3ba04eaf45c ] A second dereference is needed to get the accurate size of the relocation_hashtable. Signed-off-by: Charlie Jenkins <charlie@xxxxxxxxxxxx> Fixes: d8792a5734b0 ("riscv: Safely remove entries from relocation list") Reported-by: kernel test robot <lkp@xxxxxxxxx> Reported-by: Julia Lawall <julia.lawall@xxxxxxxx> Closes: https://lore.kernel.org/r/202312120044.wTI1Uyaa-lkp@xxxxxxxxx/ Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240104-module_loading_fix-v3-3-a71f8de6ce0f@xxxxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index 91f7cd221afc..c9d59a5448b6 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;