]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: IPSec, Fix a race between concurrent sandbox QP commands
authorYossi Kuperman <yossiku@mellanox.com>
Tue, 17 Oct 2017 17:39:17 +0000 (20:39 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 24 May 2018 21:40:40 +0000 (14:40 -0700)
commitfdcb4bde016b79828aeef3ce8967e5b1209fdfe0
tree3811cb75e9780f37d41eb84adec883bc2a25c766
parent756bd464eb9cdc7175b74fb8215f4d181c2069a4
net/mlx5: IPSec, Fix a race between concurrent sandbox QP commands

Sandbox QP Commands are retired in the order they are sent. Outstanding
commands are stored in a linked-list in the order they appear. Once a
response is received and the callback gets called, we pull the first
element off the pending list, assuming they correspond.

Sending a message and adding it to the pending list is not done atomically,
hence there is an opportunity for a race between concurrent requests.

Bind both send and add under a critical section.

Fixes: ae7683d23728 ("net/mlx5: Accel, Add IPSec acceleration interface")
Signed-off-by: Yossi Kuperman <yossiku@mellanox.com>
Signed-off-by: Adi Nissim <adin@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c