Skip to content
Commit 31c02e21 authored by Roland Dreier's avatar Roland Dreier
Browse files

IPoIB: Avoid using stale last_send counter when reaping AHs



The comparisons of priv->tx_tail to ah->last_send in ipoib_free_ah()
and ipoib_post_receive() are slightly unsafe, because priv->tx_lock is
not held and hence a stale value of ah->last_send might be used, which
would lead to freeing an AH before the driver was really done with it.
The simple way to fix this is to the optimization of early free from
ipoib_free_ah() and unconditionally queue AHs for reaping, and then
take priv->tx_lock in __ipoib_reap_ah().

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 9874e746
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment