android_kernel_xiaomi_sm8350/drivers/infiniband/core
Roland Dreier 39798695b4 IB/mad: Fix race between cancel and receive completion
When ib_cancel_mad() is called, it puts the canceled send on a list
and schedules a "flushed" callback from process context.  However,
this leaves a window where a receive completion could be processed
before the send is fully flushed.

This is fine, except that ib_find_send_mad() will find the MAD and
return it to the receive processing, which results in the sender
getting both a successful receive and a "flushed" send completion for
the same request.  Understandably, this confuses the sender, which is
expecting only one of these two callbacks, and leads to grief such as
a use-after-free in IPoIB.

Fix this by changing ib_find_send_mad() to return a send struct only
if the status is still successful (and not "flushed").  The search of
the send_list already had this check, so this patch just adds the same
check to the search of the wait_list.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-13 09:38:07 -08:00
..
addr.c RDMA/addr: Use client registration to fix module unload race 2006-11-02 14:26:04 -08:00
agent.c
agent.h
cache.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
cm_msgs.h
cm.c IB/cm: Send DREP in response to unmatched DREQ 2006-10-10 12:50:38 -07:00
cma.c RDMA/addr: Use client registration to fix module unload race 2006-11-02 14:26:04 -08:00
core_priv.h
device.c IB: Fix typo in kerneldoc for ib_set_client_data() 2006-09-22 15:22:58 -07:00
fmr_pool.c
iwcm.c RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
iwcm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
mad_priv.h [PATCH] missing includes from infiniband merge 2006-09-23 11:34:43 -07:00
mad_rmpp.c IB: Whitespace fixes 2006-09-22 15:22:46 -07:00
mad_rmpp.h
mad.c IB/mad: Fix race between cancel and receive completion 2006-11-13 09:38:07 -08:00
Makefile RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
packer.c
sa_query.c IB/sa: Require SA registration 2006-09-22 15:22:53 -07:00
smi.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
smi.h
sysfs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
ucm.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
ud_header.c
user_mad.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
uverbs_cmd.c IB/uverbs: Return sq_draining value in query_qp response 2006-10-30 21:19:35 -08:00
uverbs_main.c IB/uverbs: Avoid a crash on device hot remove 2006-08-03 10:56:42 -07:00
uverbs_marshall.c
uverbs_mem.c
uverbs.h IB/uverbs: Avoid a crash on device hot remove 2006-08-03 10:56:42 -07:00
verbs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00