Commit 7cf50629 authored by Alaa Hleihel's avatar Alaa Hleihel Committed by Kleber Sacilotto de Souza

RDMA/mlx4: Initialize ib_spec on the stack

BugLink: https://bugs.launchpad.net/bugs/1878246

commit c08cfb2d upstream.

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: a37a1a42 ("IB/mlx4: Add mechanism to support flow steering over IB links")
Link: https://lore.kernel.org/r/20200413132235.930642-1-leon@kernel.orgSigned-off-by: default avatarAlaa Hleihel <alaa@mellanox.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 012ac814
...@@ -1435,8 +1435,9 @@ static int __mlx4_ib_create_default_rules( ...@@ -1435,8 +1435,9 @@ static int __mlx4_ib_create_default_rules(
int i; int i;
for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) { for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {
union ib_flow_spec ib_spec = {};
int ret; int ret;
union ib_flow_spec ib_spec;
switch (pdefault_rules->rules_create_list[i]) { switch (pdefault_rules->rules_create_list[i]) {
case 0: case 0:
/* no rule */ /* no rule */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment