svn commit: r205411 - head/sys/net

Ed Maste emaste at FreeBSD.org
Sun Mar 21 15:00:34 UTC 2010


Author: emaste
Date: Sun Mar 21 15:00:33 2010
New Revision: 205411
URL: http://svn.freebsd.org/changeset/base/205411

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

Modified:
  head/sys/net/if_vlan.c

Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c	Sun Mar 21 13:18:08 2010	(r205410)
+++ head/sys/net/if_vlan.c	Sun Mar 21 15:00:33 2010	(r205411)
@@ -1382,9 +1382,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;


More information about the svn-src-all mailing list