diff mbox series

soc: xilinx: zynqmp: fix out of bounds array access

Message ID 5f1409de285d7454af171a54e5f115da9d82c44e.1650440343.git.michal.simek@xilinx.com
State Accepted
Commit 303198e26dd455aafd23d25e9f4d99d9fee1caec
Delegated to: Michal Simek
Headers show
Series soc: xilinx: zynqmp: fix out of bounds array access | expand

Commit Message

Michal Simek April 20, 2022, 7:39 a.m. UTC
The call to xilinx_pm_request requires an array of a larger size.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

The same change was done for versal by
https://lore.kernel.org/r/20220416181530.2311155-1-jorge@foundries.io
---
 drivers/soc/soc_xilinx_zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Simek May 10, 2022, 2:25 p.m. UTC | #1
st 20. 4. 2022 v 9:39 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> The call to xilinx_pm_request requires an array of a larger size.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> The same change was done for versal by
> https://lore.kernel.org/r/20220416181530.2311155-1-jorge@foundries.io
> ---
>  drivers/soc/soc_xilinx_zynqmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
> index 7d33ce2163d8..a71115b17ccd 100644
> --- a/drivers/soc/soc_xilinx_zynqmp.c
> +++ b/drivers/soc/soc_xilinx_zynqmp.c
> @@ -49,7 +49,7 @@ static const struct soc_ops soc_xilinx_zynqmp_ops = {
>  static int soc_xilinx_zynqmp_probe(struct udevice *dev)
>  {
>         struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
> -       u32 ret_payload[4];
> +       u32 ret_payload[PAYLOAD_ARG_CNT];
>         int ret;
>
>         priv->family = zynqmp_family;
> --
> 2.35.1
>

Applied.
M
diff mbox series

Patch

diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
index 7d33ce2163d8..a71115b17ccd 100644
--- a/drivers/soc/soc_xilinx_zynqmp.c
+++ b/drivers/soc/soc_xilinx_zynqmp.c
@@ -49,7 +49,7 @@  static const struct soc_ops soc_xilinx_zynqmp_ops = {
 static int soc_xilinx_zynqmp_probe(struct udevice *dev)
 {
 	struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
-	u32 ret_payload[4];
+	u32 ret_payload[PAYLOAD_ARG_CNT];
 	int ret;
 
 	priv->family = zynqmp_family;