1
0
Fork 0
remarkable-linux/include/linux/mlx5
Daniel Jurgens 35a9ebd920 net/mlx5: Fix race for multiple RoCE enable
[ Upstream commit 734dc065fc ]

There are two potential problems with the existing implementation.

1. Enable and disable can race after the atomic operations.
2. If a command fails the refcount is left in an inconsistent state.

Introduce a lock and perform error checking.

Fixes: a6f7d2aff6 ("net/mlx5: Add support for multiple RoCE enable")
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-12 12:32:17 +02:00
..
cmd.h net/mlx5_core: Fix Mellanox copyright note 2015-04-02 16:33:42 -04:00
cq.h IB/mlx5: Support 4k UAR for libmlx5 2017-01-09 20:25:09 +02:00
device.h net/mlx5: Fix FPGA capability location 2017-09-28 07:23:09 +03:00
doorbell.h IB/mlx5: Use blue flame register allocator in mlx5_ib 2017-01-09 20:25:08 +02:00
driver.h net/mlx5: Fix race for multiple RoCE enable 2018-04-12 12:32:17 +02:00
fs.h net/mlx5: Use underlay QPN from the root name space 2017-05-14 13:33:45 +03:00
mlx5_ifc.h {net,ib}/mlx5: Don't disable local loopback multicast traffic when needed 2018-01-31 14:03:46 +01:00
mlx5_ifc_fpga.h net/mlx5: Accel, Add IPSec acceleration interface 2017-06-27 16:36:47 +03:00
port.h net/mlx5e: DCBNL, Implement tc with ets type and zero bandwidth 2017-10-26 00:47:27 -07:00
qp.h RDMA/mlx5: Fix existence check for extended address vector 2017-08-04 14:24:05 -04:00
srq.h net/mlx5: Add XRQ support 2017-08-29 08:30:20 -04:00
transobj.h IB/mlx5: Support setting Ethernet priority for Raw Packet QPs 2016-01-21 12:01:09 -05:00
vport.h net/mlx5: Add raw ethernet local loopback firmware command 2017-07-24 10:26:16 -04:00