aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/re
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2011-11-16 22:09:14 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2011-11-16 22:09:14 +0000
commit600af6c29b0b559cdff73380e70646047a3e4ea9 (patch)
treea26a52b8d498d24335ed6b14aec9d663b72724bc /sys/dev/re
parentd56f7f5284b3bd0652af12344134e5d7baf731dd (diff)
downloadsrc-600af6c29b0b559cdff73380e70646047a3e4ea9.tar.gz
src-600af6c29b0b559cdff73380e70646047a3e4ea9.zip
Add missing driver lock in SIOCSIFCAP handler.
Notes
Notes: svn path=/head/; revision=227591
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 90b23edbcf53..621cc0e37ee4 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -3312,6 +3312,7 @@ re_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
}
#endif /* DEVICE_POLLING */
+ RL_LOCK(sc);
if ((mask & IFCAP_TXCSUM) != 0 &&
(ifp->if_capabilities & IFCAP_TXCSUM) != 0) {
ifp->if_capenable ^= IFCAP_TXCSUM;
@@ -3370,8 +3371,9 @@ re_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) {
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- re_init(sc);
+ re_init_locked(sc);
}
+ RL_UNLOCK(sc);
VLAN_CAPABILITIES(ifp);
}
break;