Index: sys/netinet/igmp.c =================================================================== RCS file: /cvsroot/src/sys/netinet/igmp.c,v retrieving revision 1.55 diff -p -u -r1.55 igmp.c --- sys/netinet/igmp.c 29 May 2014 23:02:48 -0000 1.55 +++ sys/netinet/igmp.c 22 Aug 2014 16:50:12 -0000 @@ -469,6 +469,8 @@ igmp_input(struct mbuf *m, ...) int igmp_joingroup(struct in_multi *inm) { + + KASSERT(mutex_owned(softnet_lock)); KASSERT(in_multi_lock_held()); inm->inm_state = IGMP_IDLE_MEMBER; @@ -494,6 +496,8 @@ igmp_joingroup(struct in_multi *inm) void igmp_leavegroup(struct in_multi *inm) { + + KASSERT(mutex_owned(softnet_lock)); KASSERT(in_multi_lock_held()); switch (inm->inm_state) { Index: sys/netinet/ip_output.c =================================================================== RCS file: /cvsroot/src/sys/netinet/ip_output.c,v retrieving revision 1.230 diff -p -u -r1.230 ip_output.c --- sys/netinet/ip_output.c 6 Jun 2014 00:11:19 -0000 1.230 +++ sys/netinet/ip_output.c 22 Aug 2014 16:50:12 -0000 @@ -1645,8 +1645,11 @@ ip_freemoptions(struct ip_moptions *imo) int i; if (imo != NULL) { - for (i = 0; i < imo->imo_num_memberships; ++i) + for (i = 0; i < imo->imo_num_memberships; ++i) { + mutex_enter(softnet_lock); in_delmulti(imo->imo_membership[i]); + mutex_exit(softnet_lock); + } kmem_free(imo, sizeof(*imo)); } }