diff options
author | zec <zec@FreeBSD.org> | 2009-08-28 22:51:07 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2009-08-28 22:51:07 +0000 |
commit | e9ba936d598c3f45391395094bc23319e1ddd1d6 (patch) | |
tree | ad00400e7601031e7625369a588a07de6ae5e556 /sys/compat/linprocfs | |
parent | 0bf6e8da4eba6a1fb35ec2e5b2db62e53fec7d32 (diff) | |
download | FreeBSD-src-e9ba936d598c3f45391395094bc23319e1ddd1d6.zip FreeBSD-src-e9ba936d598c3f45391395094bc23319e1ddd1d6.tar.gz |
Fix a few panics in linuxulator + VIMAGE due to curvnet not being set.
This change affects only options VIMAGE builds.
Reviewed by: julian
MFC after: 3 days
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index dfa80d5..541db2f 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1085,6 +1085,7 @@ linprocfs_donetdev(PFS_FILL_ARGS) "bytes packets errs drop fifo frame compressed", "bytes packets errs drop fifo frame compressed"); + CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { linux_ifname(ifp, ifname, sizeof ifname); @@ -1095,6 +1096,7 @@ linprocfs_donetdev(PFS_FILL_ARGS) 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); } IFNET_RUNLOCK(); + CURVNET_RESTORE(); return (0); } |