diff options
author | 2020-04-22 09:19:08 +0300 | |
---|---|---|
committer | 2020-04-30 10:10:42 -0700 | |
commit | 72d3fef16158b9c1852855a3846757ec165c16e1 (patch) | |
tree | 8ce5bd60fa050e461a3c525bac6a5a8d1fa4235c /net/ipv4/sysctl_net_ipv4.c | |
parent | Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux (diff) | |
download | wireguard-linux-72d3fef16158b9c1852855a3846757ec165c16e1.tar.xz wireguard-linux-72d3fef16158b9c1852855a3846757ec165c16e1.zip |
net/mlx5: IPsec, Fix coverity issue
The cited commit introduced the following coverity issue at functions
mlx5_fpga_is_ipsec_device() and mlx5_fpga_ipsec_release_sa_ctx():
- bit_and_with_zero:
accel_xfrm->attrs.action & MLX5_ACCEL_ESP_ACTION_DECRYPT is always 0.
As MLX5_ACCEL_ESP_ACTION_DECRYPT is not a bitwise flag and was wrongly
used with bitwise operation, the above expression is always zero value
as MLX5_ACCEL_ESP_ACTION_DECRYPT is zero.
Fix by using "==" comparison operator instead.
Fixes: 7dfee4b1d79e ("net/mlx5: IPsec, Refactor SA handle creation and destruction")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
0 files changed, 0 insertions, 0 deletions