Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fbf5316 authored by Alaa Hleihel's avatar Alaa Hleihel Committed by Greg Kroah-Hartman
Browse files

RDMA/mlx4: Initialize ib_spec on the stack

commit c08cfb2d8d78bfe81b37cc6ba84f0875bddd0d5c 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.org


Signed-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>
parent 779bb362
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1589,8 +1589,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 */