Skip to content

Commit

Permalink
RDMA/mlx4: Initialize ib_spec on the stack
Browse files Browse the repository at this point in the history
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/20200413132235.930642-1-leon@kernel.org
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Alaa Hleihel authored and Jason Gunthorpe committed Apr 14, 2020
1 parent 9836535 commit c08cfb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit c08cfb2

Please sign in to comment.