Message ID | 20231214012505.42666-5-saeed@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | ddb38ddff9c71026bad481b791a94d446ee37603 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,01/15] Revert "net/mlx5e: fix double free of encap_header in update funcs" | expand |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c index 5a31fb47ffa5..21753f327868 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c @@ -277,7 +277,7 @@ int mlx5_query_nic_vport_mac_list(struct mlx5_core_dev *dev, req_list_size = max_list_size; } - out_sz = MLX5_ST_SZ_BYTES(query_nic_vport_context_in) + + out_sz = MLX5_ST_SZ_BYTES(query_nic_vport_context_out) + req_list_size * MLX5_ST_SZ_BYTES(mac_address_layout); out = kvzalloc(out_sz, GFP_KERNEL);