Patch "clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()" has been added to the 5.15-stable tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Le 06/09/2022 à 05:28, Sasha Levin a écrit :
Quoted 7 lines
This is a note to let you know that I've just added the patch titled
clk: bcm: rpi: Use correct order for the parameters of
devm_kcalloc()to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
Quoted 6 lines
The filename of the patch is:
clk-bcm-rpi-use-correct-order-for-the-parameters-of-.patch
and it can be found in the queue-5.15 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Hi,
I'm not sure that such a patch deserve a backport.
It is correct, but it is just a clean-up that will be a no-op at runtime. Should it help future potential backport, why not, but otherwise, IMHO, it could be dropped.
It is also in the 5.10 backport queue.
Just my 2c,
CJ
Quoted 30 lines
commit
f731681dfb26866e5e4130d27d27e00766f7e9d1Author: Christophe JAILLET <[email protected]> Date: Fri May 20 23:20:58 2022 +0200clk: bcm: rpi: Use correct order for the parameters of
devm_kcalloc()[ Upstream commit
b7fa6242f3e035308a76284560e4f918dad9b017]We should have 'n', then 'size', not the opposite.
This is harmless because the 2 values are just multiplied, but having the correct order silence a (unpublished yet) smatch warning.Signed-off-by Christophe JAILLET <[email protected]>Link https://lore.kernel.org/r/49d726d11964ca0e3757bdb5659e3b3eaa1572b5.1653081643.git.christophe.jaillet@wanadoo.fr open hereSigned-off-by Stephen Boyd <[email protected]>Signed-off-by Sasha Levin <[email protected]>drivers/clk/bcm/clk-raspberrypi.c +1
-1@@ -252,7 +252,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,int ret; clks =devm_kcalloc (rpi->dev, -sizeof (*clks),RPI_FIRMWARE_NUM_CLK_ID , +RPI_FIRMWARE_NUM_CLK_ID ,sizeof (*clks),GFP_KERNEL );if (!clks)return -ENOMEM ;
Sasha Levin
maintainerQuoted 16 lines · Marion & Christophe JAILLET
Le 06/09/2022 à 05:28, Sasha Levin a écrit :
Quoted 7 lines
This is a note to let you know that I've just added the patch titled
clk: bcm: rpi: Use correct order for the parameters of
devm_kcalloc()to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryQuoted 6 lines
The filename of the patch is:
clk-bcm-rpi-use-correct-order-for-the-parameters-of-.patch
and it can be found in the queue-5.15 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 8 lines
Hi,
I'm not sure that such a patch deserve a backport.
It is correct, but it is just a clean-up that will be a no-op at runtime. Should it help future potential backport, why not, but otherwise, IMHO, it could be dropped.
It is also in the 5.10 backport queue.
You're very much correct, it's only there for the benefit of bc163555603e ("clk: bcm: rpi: Prevent out-of-bounds access") which follows it :)
Signature · 2 lines
Thanks, Sasha