svn commit: r252510 - head/sys/netinet

Hiroki Sato hrs at FreeBSD.org
Tue Jul 2 16:39:13 UTC 2013


Author: hrs
Date: Tue Jul  2 16:39:12 2013
New Revision: 252510
URL: http://svnweb.freebsd.org/changeset/base/252510

Log:
  Fix a panic when leaving MC group in a kernel with VIMAGE enabled.
  in_leavegroup() is called from an asynchronous task, and
  igmp_change_state() requires that curvnet is set by the caller.

Modified:
  head/sys/netinet/in_mcast.c

Modified: head/sys/netinet/in_mcast.c
==============================================================================
--- head/sys/netinet/in_mcast.c	Tue Jul  2 14:54:18 2013	(r252509)
+++ head/sys/netinet/in_mcast.c	Tue Jul  2 16:39:12 2013	(r252510)
@@ -1236,7 +1236,9 @@ in_leavegroup_locked(struct in_multi *in
 	KASSERT(error == 0, ("%s: failed to merge inm state", __func__));
 
 	CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__);
+	CURVNET_SET(inm->inm_ifp->if_vnet);
 	error = igmp_change_state(inm);
+	CURVNET_RESTORE();
 	if (error)
 		CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__);
 


More information about the svn-src-head mailing list