Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA

ioctl call, as it may sleep.

Reviewed by:	rwatson
This commit is contained in:
Ed Maste 2010-03-21 15:00:33 +00:00
parent be05bc3ffb
commit d8564efde1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205411

View File

@ -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;