svn commit: r362468 - head/sys/net
Pawel Biernacki
kaktus at FreeBSD.org
Sun Jun 21 18:40:18 UTC 2020
Author: kaktus
Date: Sun Jun 21 18:40:17 2020
New Revision: 362468
URL: https://svnweb.freebsd.org/changeset/base/362468
Log:
net.link.generic.ifdata.<ifindex>.linkspecific: rework handler
This OID was added in r17352 but the write path of IFDATA_LINKSPECIFIC
seems unused as there are no in-base writers, and as far as I can tell
we had issues with this code before, see PR 219472. Drop the write path
to make the handler read-only as described in comments and man-pages.
It can be marked as MPSAFE now.
Reviewed by: bdragon, kib, melifaro, wollman
Approved by: kib (mentor)
Sponsored by: Mysterious Code Ltd.
Differential Revision: https://reviews.freebsd.org/D25348
Modified:
head/sys/net/if_mib.c
Modified: head/sys/net/if_mib.c
==============================================================================
--- head/sys/net/if_mib.c Sun Jun 21 16:06:01 2020 (r362467)
+++ head/sys/net/if_mib.c Sun Jun 21 18:40:17 2020 (r362468)
@@ -122,10 +122,6 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax!
error = SYSCTL_OUT(req, ifp->if_linkmib, ifp->if_linkmiblen);
if (error || !req->newptr)
goto out;
-
- error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen);
- if (error)
- goto out;
break;
case IFDATA_DRIVERNAME:
@@ -152,6 +148,6 @@ out:
}
static SYSCTL_NODE(_net_link_generic, IFMIB_IFDATA, ifdata,
- CTLFLAG_RW | CTLFLAG_NEEDGIANT, sysctl_ifdata,
+ CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ifdata,
"Interface table");
More information about the svn-src-all
mailing list