svn commit: r353350 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Wed Oct 9 16:21:51 UTC 2019
Author: glebius
Date: Wed Oct 9 16:21:50 2019
New Revision: 353350
URL: https://svnweb.freebsd.org/changeset/base/353350
Log:
ifnet_byindex_ref() requires network epoch.
Modified:
head/sys/net/if_mib.c
Modified: head/sys/net/if_mib.c
==============================================================================
--- head/sys/net/if_mib.c Wed Oct 9 16:21:05 2019 (r353349)
+++ head/sys/net/if_mib.c Wed Oct 9 16:21:50 2019 (r353350)
@@ -80,6 +80,7 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax!
u_int namelen = arg2;
struct ifnet *ifp;
struct ifmibdata ifmd;
+ struct epoch_tracker et;
size_t dlen;
char *dbuf;
@@ -87,7 +88,9 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax!
return EINVAL;
if (name[0] <= 0)
return (ENOENT);
+ NET_EPOCH_ENTER(et);
ifp = ifnet_byindex_ref(name[0]);
+ NET_EPOCH_EXIT(et);
if (ifp == NULL)
return (ENOENT);
More information about the svn-src-head
mailing list