Skip to content

Commit b4ced7a

Browse files
dickmanmaorgregkh
authored andcommitted
net/mlx5: E-Switch, Fix uninitialized variable modact
commit d8e5883 upstream. 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 <maord@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 502c37b commit b4ced7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static int
292292
create_chain_restore(struct fs_chain *chain)
293293
{
294294
struct mlx5_eswitch *esw = chain->chains->dev->priv.eswitch;
295-
char modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)];
295+
u8 modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)] = {};
296296
struct mlx5_fs_chains *chains = chain->chains;
297297
enum mlx5e_tc_attr_to_reg chain_to_reg;
298298
struct mlx5_modify_hdr *mod_hdr;

0 commit comments

Comments
 (0)