linux/drivers/infiniband
Bart Van Assche 65567e4121 RDMA/rxe: Fix a race condition in rxe_requester()
The rxe driver works as follows:
* The send queue, receive queue and completion queues are implemented as
  circular buffers.
* ib_post_send() and ib_post_recv() calls are serialized through a spinlock.
* Removing elements from various queues happens from tasklet
  context. Tasklets are guaranteed to run on at most one CPU. This serializes
  access to these queues. See also rxe_completer(), rxe_requester() and
  rxe_responder().
* rxe_completer() processes the skbs queued onto qp->resp_pkts.
* rxe_requester() handles the send queue (qp->sq.queue).
* rxe_responder() processes the skbs queued onto qp->req_pkts.

Since rxe_drain_req_pkts() processes qp->req_pkts, calling
rxe_drain_req_pkts() from rxe_requester() is racy. Hence this patch.

Reported-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
2018-01-18 14:49:19 -05:00
..
core IB/cma: use strlcpy() instead of strncpy() 2018-01-15 15:33:21 -07:00
hw RDMA/bnxt_re: Add SRQ support for Broadcom adapters 2018-01-18 14:49:19 -05:00
sw RDMA/rxe: Fix a race condition in rxe_requester() 2018-01-18 14:49:19 -05:00
ulp infiniband: fix ulp/opa_vnic/opa_vnic_vema.c kernel-doc notation 2018-01-10 22:00:34 -07:00
Kconfig IB: INFINIBAND should depend on HAS_DMA 2017-11-30 16:01:28 -07:00
Makefile