diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-07-14 23:48:47 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-07-14 23:48:47 -0700 |
commit | a7d834c4bc6be73e8f83eaa5072fac3c5549f7f2 (patch) | |
tree | aec2ed171dee9fc29b2a968a8048808d85b2cec1 /drivers/rtc/rtc-ep93xx.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 <pradeep@us.ibm.com> and
David Wilder <dwilder@us.ibm.com>, with debugging help from Hoang-Nam
Nguyen <hnguyen@de.ibm.com>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/rtc/rtc-ep93xx.c')
0 files changed, 0 insertions, 0 deletions