From: kn Date: Tue, 8 Nov 2022 17:57:47 +0000 (+0000) Subject: Unlock SIOCIFGCLONERS X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2b339f4b78f353a76c09f4edde2337a23c842647;p=openbsd Unlock SIOCIFGCLONERS ifconfig(8) -C is the only user in base and the if_clone_attach() comment explains how this list is being built during autoconf(9). After that it is only ever read. Multiple threads may traverse the list in parallel and reading the `int' count is atomic. OK mvs --- diff --git a/sys/net/if.c b/sys/net/if.c index 74c97ecdeb4..99c19721a74 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.668 2022/11/08 17:57:14 kn Exp $ */ +/* $OpenBSD: if.c,v 1.669 2022/11/08 17:57:47 kn Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -2435,9 +2435,7 @@ ifioctl_get(u_long cmd, caddr_t data) KERNEL_UNLOCK(); return (error); case SIOCIFGCLONERS: - KERNEL_LOCK(); error = if_clone_list((struct if_clonereq *)data); - KERNEL_UNLOCK(); return (error); case SIOCGIFGMEMB: KERNEL_LOCK();