IB/ipath: Fix a race where s_last is updated without lock held
authorRalph Campbell <ralph.campbell@qlogic.com>
Fri, 19 Oct 2007 22:04:10 +0000 (15:04 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Oct 2007 17:57:24 +0000 (10:57 -0700)
There is a small window where a send work queue entry could be
overwritten by ib_post_send() because s_last is updated before the
entry is read.

This patch closes the window by acquiring the lock and updating
the last send work queue entry index after reading the wr_id.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

No differences found