Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2014 18:43:03 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264323 - head/sys/net
Message-ID:  <201404101843.s3AIh3ZV077523@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bms
Date: Thu Apr 10 18:43:02 2014
New Revision: 264323
URL: http://svnweb.freebsd.org/changeset/base/264323

Log:
  In if_freemulti(), relax the paranoid KASSERT() on ifma->ifma_protospec.
  
  This KASSERT() existed as a sanity check that upper layers in the network
  stack (e.g. inet, inet6) had released their reference to the underlying
  driver's multicast memberships (ifmultiaddr{}). However it assumes the
  lifecycle of the driver membership corresponds to the lifecycle of the
  network layer membership.
  
  In the submitter's case, ieee80211_ioctl_updatemulti() attempts to
  reprogram the (parent, physical) ifnet{} memberships in response
  to a change in membership on the (child, virtual) VAP ifnet, using
  a batched update mechanism. These updates happen independently from
  the network layer, causing a "false negative" assertion failure.
  
  There are possibly other use cases where this KASSERT() may be triggered
  by other networking stack activity (e.g. where a nesting relationship
  exists between multiple ifnet{} instances). This suggests that further
  review of FreeBSD's approach to nested ifnet relationships is needed.
  
  MFC after:	6 weeks
  Submitted by:	adrian@

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Thu Apr 10 18:34:26 2014	(r264322)
+++ head/sys/net/if.c	Thu Apr 10 18:43:02 2014	(r264323)
@@ -2937,8 +2937,6 @@ if_freemulti(struct ifmultiaddr *ifma)
 
 	KASSERT(ifma->ifma_refcount == 0, ("if_freemulti: refcount %d",
 	    ifma->ifma_refcount));
-	KASSERT(ifma->ifma_protospec == NULL,
-	    ("if_freemulti: protospec not NULL"));
 
 	if (ifma->ifma_lladdr != NULL)
 		free(ifma->ifma_lladdr, M_IFMADDR);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404101843.s3AIh3ZV077523>