aboutsummaryrefslogtreecommitdiff
path: root/test/std
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2024-10-19 13:03:56 +0000
committerMark Johnston <markj@FreeBSD.org>2024-10-19 13:03:56 +0000
commitf4e35c044c8988b7452cefbdcc417f5fd723e021 (patch)
treed10e08fe250b052bd8c8c99ab1f0a841cb4e4943 /test/std
parent4ad443a106d3201453dc4ce0412431df2c0d1a47 (diff)
downloadsrc-main.tar.gz
src-main.zip
bus: Set the current VNET in device_attach()HEADmain
Some drivers, in particular anything which creates an ifnet during attach, need to have the current VNET set, as if_attach_internal() and its callees access VNET-global variables. device_probe_and_attach() handles this, but this is not the only way to arrive in DEVICE_ATTACH. In particular, bus drivers may invoke device_attach() directly, as does devctl2's DEV_ENABLE ioctl handler. So, set the current VNET in device_attach() instead. I believe it is always safe to use vnet0, as devctl2 ioctls are not permitted within a jail. PR: 282168 Reviewed by: zlei, kevans, bz, imp, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47174
Diffstat (limited to 'test/std')
0 files changed, 0 insertions, 0 deletions