Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2012 13:01:17 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244210 - head/sys/netpfil/pf
Message-ID:  <201212141301.qBED1H0I063871@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Fri Dec 14 13:01:16 2012
New Revision: 244210
URL: http://svnweb.freebsd.org/changeset/base/244210

Log:
    Fix error in r235991. No-sleep version of IFNET_RLOCK() should
  be used here, since we may hold the main pf rulesets rwlock.
  
  Reported by:	Fleuriot Damien <ml my.gd>

Modified:
  head/sys/netpfil/pf/pf_if.c

Modified: head/sys/netpfil/pf/pf_if.c
==============================================================================
--- head/sys/netpfil/pf/pf_if.c	Fri Dec 14 12:37:35 2012	(r244209)
+++ head/sys/netpfil/pf/pf_if.c	Fri Dec 14 13:01:16 2012	(r244210)
@@ -478,10 +478,10 @@ pfi_table_update(struct pfr_ktable *kt, 
 	if (kif->pfik_ifp != NULL)
 		pfi_instance_add(kif->pfik_ifp, net, flags);
 	else if (kif->pfik_group != NULL) {
-		IFNET_RLOCK();
+		IFNET_RLOCK_NOSLEEP();
 		TAILQ_FOREACH(ifgm, &kif->pfik_group->ifg_members, ifgm_next)
 			pfi_instance_add(ifgm->ifgm_ifp, net, flags);
-		IFNET_RUNLOCK();
+		IFNET_RUNLOCK_NOSLEEP();
 	}
 
 	if ((e = pfr_set_addrs(&kt->pfrkt_t, V_pfi_buffer, V_pfi_buffer_cnt, &size2,



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