From: Eli Cohen Date: Tue, 28 Feb 2006 04:47:43 +0000 (-0800) Subject: IPoIB: Close race in setting mcast->ah X-Git-Tag: v2.6.17-rc1~1180^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7343b231f22cec11f069bcdbb0c9a417df2750d3;p=pandora-kernel.git IPoIB: Close race in setting mcast->ah ipoib_mcast_send() tests mcast->ah twice. If this value is changed between these two points, we leak an skb. However, ipoib_mcast_join_finish() sets mcast->ah with no locking, so it could race against ipoib_mcast_send(). As a solution, take priv->lock around assignment to mcast->ah thus making sure ipoib_mcast_send() (which also takes priv->lock) is not in flight. Signed-off-by: Eli Cohen Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- Reading git-diff-tree failed