Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Mar 2010 00:13:16 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r205812 - stable/7/sys/net
Message-ID:  <201003290013.o2T0DGIp088397@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Mar 29 00:13:16 2010
New Revision: 205812
URL: http://svn.freebsd.org/changeset/base/205812

Log:
  MFC r205411:
  
    Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA
    ioctl call, as it may sleep.
  
    Reviewed by:    rwatson

Modified:
  stable/7/sys/net/if_vlan.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/net/if_vlan.c
==============================================================================
--- stable/7/sys/net/if_vlan.c	Mon Mar 29 00:09:56 2010	(r205811)
+++ stable/7/sys/net/if_vlan.c	Mon Mar 29 00:13:16 2010	(r205812)
@@ -1331,9 +1331,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
 	case SIOCGIFMEDIA:
 		VLAN_LOCK();
 		if (TRUNK(ifv) != NULL) {
-			error = (*PARENT(ifv)->if_ioctl)(PARENT(ifv),
-					SIOCGIFMEDIA, data);
+			p = PARENT(ifv);
 			VLAN_UNLOCK();
+			error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data);
 			/* Limit the result to the parent's current config. */
 			if (error == 0) {
 				struct ifmediareq *ifmr;



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