RDMA/mlx4: Initialize ib_spec on the stack
Subsystems (2)
PATCH 1/1 RDMA/mlx4: Initialize ib_spec on the stack
From: Alaa Hleihel <[email protected]>
Initialize ib_spec on the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error.
Fixes a37a1a428431 ("IB/mlx4: Add mechanism to support flow steering over IB links")
Signed-off-by Alaa Hleihel <[email protected]>
Reviewed-by Maor Gottlieb <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/hw/mlx4/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mlx4/main.c +2 -1
@@ -1499,8 +1499,9 @@ static int __mlx4_ib_create_default_rules(int i;for (i =0 ; i <ARRAY_SIZE (pdefault_rules->rules_create_list); i++) { +union ib_flow_spec ib_spec = {};int ret; -union ib_flow_spec ib_spec; +switch (pdefault_rules->rules_create_list[i]) {case 0 :/* no rule */
Signature · 1 line
2.25.2
Jason Gunthorpe
AppliedQuoted 6 lines · Leon Romanovsky
From: Alaa Hleihel <[email protected]>
Initialize
ib_specon the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error.
Quoted 7 lines
Fixes a37a1a428431 ("IB/mlx4: Add mechanism to support flow steering over IB links")Signed-off-by Alaa Hleihel <[email protected]>Reviewed-by Maor Gottlieb <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx4/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-rc, thanks
Jason