From: mvs Date: Mon, 9 Sep 2024 07:37:47 +0000 (+0000) Subject: Don't take netlock while setting `if_description'. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=efb6c398e3b486ca435786077d7480e836780ede;p=openbsd Don't take netlock while setting `if_description'. net/if_pppx.c is the only place where `if_description' accessed outside ifioctl() path and there is no reason to take netlock here. SIOCSIFDESCR case of ifioctl() modifies `if_description' with the only kernel lock. ok bluhm --- diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 5246bd7f7a0..c7f15df7b26 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.129 2024/07/30 13:41:15 yasuoka Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.130 2024/09/09 07:37:47 mvs Exp $ */ /* * Copyright (c) 2010 Claudio Jeker @@ -786,10 +786,8 @@ pppx_set_session_descr(struct pppx_dev *pxd, if (pxi == NULL) return (EINVAL); - NET_LOCK(); (void)memset(pxi->pxi_if.if_description, 0, IFDESCRSIZE); strlcpy(pxi->pxi_if.if_description, req->pdr_descr, IFDESCRSIZE); - NET_UNLOCK(); pppx_if_rele(pxi);