]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix srq free in destroy qp
authorMoshe Lazer <moshel@mellanox.com>
Wed, 23 Oct 2013 06:53:17 +0000 (09:53 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 8 Nov 2013 22:42:59 +0000 (14:42 -0800)
commit7933eb665da20547957324e7df8449409dc7eb9b
treeeba90e9378c870f96e337ae106dcb5e0a65fc27c
parent6448567c6c8e8bec7108d310d7c26e3415b44859
IB/mlx5: Fix srq free in destroy qp

On destroy QP the driver walks over the relevant CQ and removes CQEs
reported for the destroyed QP.  It also frees the related SRQ entry
without checking that this is actually an SRQ-related CQE.  In case of
a CQ used for both send and receive QP, we could free SRQ entries for
send CQEs.  This patch resolves this issue by verifying that this is a
SRQ related CQE by checking the SRQ number in the CQE is not zero.

Signed-off-by: Moshe Lazer <moshel@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx5/cq.c