diff options
author | Roland Dreier <[email protected]> | 2008-07-14 23:48:47 -0700 |
---|---|---|
committer | Roland Dreier <[email protected]> | 2008-07-14 23:48:47 -0700 |
commit | a7d834c4bc6be73e8f83eaa5072fac3c5549f7f2 (patch) | |
tree | aec2ed171dee9fc29b2a968a8048808d85b2cec1 /net/unix/sysctl_net_unix.c | |
parent | 468f2239bcc71ae0f345c3fe58c797cf4627daf4 (diff) |
IPoIB/cm: Fix racy use of receive WR/SGL in ipoib_cm_post_receive_nonsrq()
For devices that don't support SRQs, ipoib_cm_post_receive_nonsrq() is
called from both ipoib_cm_handle_rx_wc() and ipoib_cm_nonsrq_init_rx(),
and these two callers are not synchronized against each other.
However, ipoib_cm_post_receive_nonsrq() always reuses the same receive
work request and scatter list structures, so multiple callers can end
up stepping on each other, which leads to posting garbled work
requests.
Fix this by having the caller pass in the ib_recv_wr and ib_sge
structures to use, and allocating new local structures in
ipoib_cm_nonsrq_init_rx().
Based on a patch by Pradeep Satyanarayana <[email protected]> and
David Wilder <[email protected]>, with debugging help from Hoang-Nam
Nguyen <[email protected]>.
Signed-off-by: Roland Dreier <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions