Skip to content

Commit c08cfb2

Browse files
alaahljgunthorpe
authored andcommitted
RDMA/mlx4: Initialize ib_spec on the stack
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: a37a1a4 ("IB/mlx4: Add mechanism to support flow steering over IB links") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alaa Hleihel <[email protected]> Reviewed-by: Maor Gottlieb <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 9836535 commit c08cfb2

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/mlx4

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/mlx4/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,8 +1499,9 @@ static int __mlx4_ib_create_default_rules(
14991499
int i;
15001500

15011501
for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {
1502+
union ib_flow_spec ib_spec = {};
15021503
int ret;
1503-
union ib_flow_spec ib_spec;
1504+
15041505
switch (pdefault_rules->rules_create_list[i]) {
15051506
case 0:
15061507
/* no rule */

0 commit comments

Comments
 (0)