]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/mlx5: fs, assert null dest pointer when dest_num is 0
authorOz Shlomo <ozsh@nvidia.com>
Sat, 3 Dec 2022 22:13:24 +0000 (14:13 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Dec 2022 21:04:26 +0000 (13:04 -0800)
commitf07d8afb1ceae57767cf80c134b7a03e9c589276
treebf625f53d82787cb1341f1b6d60bab807acd4fbc
parent5a5624d1edf44e808481dedaf59eae61fd66e052
net/mlx5: fs, assert null dest pointer when dest_num is 0

Currently create_flow_handle() assumes a null dest pointer when there
are no destinations.
This might not be the case as the caller may pass an allocated dest
array while setting the dest_num parameter to 0.

Assert null dest array for flow rules that have no destinations (e.g. drop
rule).

Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221203221337.29267-3-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c