summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2010-03-21 15:00:33 +0000
committeremaste <emaste@FreeBSD.org>2010-03-21 15:00:33 +0000
commit41b380674344c796c599421780e9fcda2bef02ac (patch)
tree3c4cfa242a44b5e7ec5fa0301600c8703b469e06 /sys/net
parent178b23b477e0ab53a43b363eb27dba7840845b67 (diff)
downloadFreeBSD-src-41b380674344c796c599421780e9fcda2bef02ac.zip
FreeBSD-src-41b380674344c796c599421780e9fcda2bef02ac.tar.gz
Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA
ioctl call, as it may sleep. Reviewed by: rwatson
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_vlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index f665047..01a8297 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1382,9 +1382,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
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;
OpenPOWER on IntegriCloud