]> err.no Git - linux-2.6/commit
IPoIB: Fix race in detaching from mcast group before attaching
authorSean Hefty <sean.hefty@intel.com>
Mon, 19 Mar 2007 22:31:36 +0000 (14:31 -0800)
committerRoland Dreier <rolandd@cisco.com>
Thu, 22 Mar 2007 21:32:09 +0000 (14:32 -0700)
commite07832b66285124038a96b25a2056e91a55d8b1e
treeff6a8d6cd476a830610a83a558861d05b4026fff
parent60a596dab7c82bdfa5ee7abcee8e0ce385d4ef21
IPoIB: Fix race in detaching from mcast group before attaching

There's a race between ipoib_mcast_leave() and ipoib_mcast_join_finish()
where we can try to detach from a multicast group before we've
attached to it.  Fix this by reordering the code in ipoib_mcast_leave
to free the multicast group first, which waits for the multicast
callback thread (which calls ipoib_mcast_join_finish()) to complete
before detaching from the group.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_multicast.c