From 426f70c7d11e62c45d44825de1f927423056d746 Mon Sep 17 00:00:00 2001 From: mvs Date: Tue, 18 Apr 2023 09:54:53 +0000 Subject: [PATCH] Call sysctl_ifnames() with shared netlock. It performs read-only access to netlock protected data. ok kn@ bluhm@ --- sys/net/rtsock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 19af84ff1b5..a57a12e0da2 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.359 2023/01/22 12:05:44 mvs Exp $ */ +/* $OpenBSD: rtsock.c,v 1.360 2023/04/18 09:54:53 mvs Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -2193,9 +2193,9 @@ sysctl_rtable(int *name, u_int namelen, void *where, size_t *given, void *new, &tableinfo, sizeof(tableinfo)); return (error); case NET_RT_IFNAMES: - NET_LOCK(); + NET_LOCK_SHARED(); error = sysctl_ifnames(&w); - NET_UNLOCK(); + NET_UNLOCK_SHARED(); break; case NET_RT_SOURCE: tableid = w.w_arg; -- 2.20.1