RDMA/mlx4: Initialize ib_spec on the stack
commit5.4-rM2-2.2.x-imx-squashedc08cfb2d8d
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:a37a1a4284
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
80ba1153bc
commit
7665d88f9d
|
@ -1492,8 +1492,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 */
|
||||||
|
|
Loading…
Reference in New Issue