ipoib_mcast_stop_thread(dev); 
ipoib_mcast_stop_thread(dev, 0); 
void ipoib_mcast_restart_task(void *dev_ptr){	struct net_device *dev = dev_ptr;	struct ipoib_dev_priv *priv = netdev_priv(dev);	struct dev_mc_list *mclist;	struct ipoib_mcast *mcast, *tmcast;	LIST_HEAD(remove_list);	unsigned long flags;	ipoib_dbg_mcast(priv, "restarting multicast task\n");	ipoib_mcast_stop_thread(dev);	spin_lock_irqsave(&priv->lock, flags);	/*	 * Unfortunately, the networking core only gives us a list of all of	 * the multicast hardware addresses. We need to figure out which ones	 * are new and which ones have been removed	 */	/* Clear out the found flag */	list_for_each_entry(mcast, &priv->multicast_list, list)		clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);	/* Mark all of the entries that are found or don't exist */	for (mclist = dev->mc_list; mclist; mclist = mclist->next) {		union ib_gid mgid;		memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid);		/* Add in the P_Key */		mgid.raw[4] = (priv->pkey >> 8) & 0xff;		mgid.raw[5] = priv->pkey & 0xff;		mcast = __ipoib_mcast_find(dev, &mgid);		if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {			struct ipoib_mcast *nmcast;			/* Not found or send-only group, let's add a new entry */			ipoib_dbg_mcast(priv, "adding multicast entry for mgid "					IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid));			nmcast = ipoib_mcast_alloc(dev, 0);			if (!nmcast) {				ipoib_warn(priv, "unable to allocate memory for multicast structure\n");				continue;			}			set_bit(IPOIB_MCAST_FLAG_FOUND, &nmcast->flags);			nmcast->mcmember.mgid = mgid;			if (mcast) {				/* Destroy the send only entry */				list_del(&mcast->list);				list_add_tail(&mcast->list, &remove_list);				rb_replace_node(&mcast->rb_node,						&nmcast->rb_node,						&priv->multicast_tree);			} else				__ipoib_mcast_add(dev, nmcast);			list_add_tail(&nmcast->list, &priv->multicast_list);		}		if (mcast)			set_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);	}	/* Remove all of the entries don't exist anymore */	list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) {		if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) &&		    !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {			ipoib_dbg_mcast(priv, "deleting multicast group " IPOIB_GID_FMT "\n",					IPOIB_GID_ARG(mcast->mcmember.mgid));			rb_erase(&mcast->rb_node, &priv->multicast_tree);			/* Move to the remove list */			list_del(&mcast->list);			list_add_tail(&mcast->list, &remove_list);		}	}	spin_unlock_irqrestore(&priv->lock, flags);	/* We have to cancel outside of the spinlock */	list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {		ipoib_mcast_leave(mcast->dev, mcast);		ipoib_mcast_free(mcast);	}	if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))		ipoib_mcast_start_thread(dev);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8d2cae0651502028bf64844508ab18528bbd65c2/ipoib_multicast.c/buggy/drivers/infiniband/ulp/ipoib/ipoib_multicast.c