linux/drivers/infiniband/hw
Kaike Wan 2b74c878b0 IB/hfi1: Unreserve a flushed OPFN request
When an OPFN request is flushed, the request is completed without
unreserving itself from the send queue. Subsequently, when a new
request is post sent, the following warning will be triggered:

WARNING: CPU: 4 PID: 8130 at rdmavt/qp.c:1761 rvt_post_send+0x72a/0x880 [rdmavt]
Call Trace:
[<ffffffffbbb61e41>] dump_stack+0x19/0x1b
[<ffffffffbb497688>] __warn+0xd8/0x100
[<ffffffffbb4977cd>] warn_slowpath_null+0x1d/0x20
[<ffffffffc01c941a>] rvt_post_send+0x72a/0x880 [rdmavt]
[<ffffffffbb4dcabe>] ? account_entity_dequeue+0xae/0xd0
[<ffffffffbb61d645>] ? __kmalloc+0x55/0x230
[<ffffffffc04e1a4c>] ib_uverbs_post_send+0x37c/0x5d0 [ib_uverbs]
[<ffffffffc04e5e36>] ? rdma_lookup_put_uobject+0x26/0x60 [ib_uverbs]
[<ffffffffc04dbce6>] ib_uverbs_write+0x286/0x460 [ib_uverbs]
[<ffffffffbb6f9457>] ? security_file_permission+0x27/0xa0
[<ffffffffbb641650>] vfs_write+0xc0/0x1f0
[<ffffffffbb64246f>] SyS_write+0x7f/0xf0
[<ffffffffbbb74ddb>] system_call_fastpath+0x22/0x27

This patch fixes the problem by moving rvt_qp_wqe_unreserve() into
rvt_qp_complete_swqe() to simplify the code and make it less
error-prone.

Fixes: ca95f802ef ("IB/hfi1: Unreserve a reserved request when it is completed")
Link: https://lore.kernel.org/r/20190715164528.74174.31364.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-07-22 14:57:55 -03:00
..
bnxt_re Linux 5.2-rc6 2019-06-28 21:18:23 -03:00
cxgb3 IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
cxgb4 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
efa RDMA/efa: Entropy in admin commands id 2019-07-04 14:31:09 -03:00
hfi1 IB/hfi1: Unreserve a flushed OPFN request 2019-07-22 14:57:55 -03:00
hns RDMA/hns: Fix sg offset non-zero issue 2019-07-22 14:44:08 -03:00
i40iw 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
mlx4 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
mlx5 RDMA/mlx5: Set RDMA DIM to be enabled by default 2019-07-08 16:37:22 -03:00
mthca IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
ocrdma IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
qedr 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
qib Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
usnic 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
vmw_pvrdma Linux 5.2-rc6 2019-06-28 21:18:23 -03:00
Makefile rdma: Remove nes 2019-06-13 09:59:49 -04:00