Skip to content

Commit d8e5883

Browse files
dickmanmaorSaeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Fix uninitialized variable modact
The variable modact is not initialized before used in command modify header allocation which can cause command to fail. Fix by initializing modact with zeros. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 8f1e0b9 ("net/mlx5: E-Switch, Mark miss packets with new chain id mapping") Signed-off-by: Maor Dickman <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent ec41332 commit d8e5883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int
212212
create_chain_restore(struct fs_chain *chain)
213213
{
214214
struct mlx5_eswitch *esw = chain->chains->dev->priv.eswitch;
215-
char modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)];
215+
u8 modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)] = {};
216216
struct mlx5_fs_chains *chains = chain->chains;
217217
enum mlx5e_tc_attr_to_reg chain_to_reg;
218218
struct mlx5_modify_hdr *mod_hdr;

0 commit comments

Comments
 (0)