From nobody Mon Feb 9 17:22:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646414991; cv=none; d=zohomail.com; s=zohoarc; b=dnW9hF6L2C9NIbDQGj3wleCty69X5q09ZHDYtyDrjnsFDPW5L2hW9Z6yR4VBdsAERvKX5O5bpwT/wUVfXPLL7IqWSmG9M66qXkrkalwHNFWwOJRbImWHs0zty5ZBIFAc9zm9A0cOz2qCmk55kpW9JPzEZYiMpirkcVSeKp4/jAg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646414991; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9NSrV46QdnuQhvay0CW7uLtgttgNB52xbjQF4Z88S88=; b=iHC1ut6h2JWSejBuHXZ13uHV2v6ivZo4Vw7joITwLFUrN8o6I5CCWXf5r9/trjxWMvZbzCukXE0ZjuwoMRF+Gn+oWO3oU9oKDFtbMk81lYdZlPlLJ/0JUNsLwmGlo0Q78HraYOyncG+zRlwWnPvu6iqOgHdNKLFGZDU/HXBIQGo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1646414991912868.0972461985315; Fri, 4 Mar 2022 09:29:51 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-wib7upbPPtifo-ImnAyfAA-1; Fri, 04 Mar 2022 12:29:49 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B44BB807353; Fri, 4 Mar 2022 17:29:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97C0A7C04B; Fri, 4 Mar 2022 17:29:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4F4E64ED66; Fri, 4 Mar 2022 17:29:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 224HTSJc024609 for ; Fri, 4 Mar 2022 12:29:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 09A7F84796; Fri, 4 Mar 2022 17:29:28 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.195.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B9247DE4C; Fri, 4 Mar 2022 17:29:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646414991; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9NSrV46QdnuQhvay0CW7uLtgttgNB52xbjQF4Z88S88=; b=UD+7hYxNHNOqO4Ec/ApHaYp9NqO910iFRvL+KK2h/j5RRNnBWvlgBQjRBxYGKZRZhBST83 +y476mus7OtDWtT9VaWNulxZ7sobybe6rd7kMgDt/18h3xxoT+XJPx13GNP5Rj/u208eJn 6OMqIHGPnl53pQDJHStLBBpsTDN/pd8= X-MC-Unique: wib7upbPPtifo-ImnAyfAA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 06/10] admin: Use automatic mutex management Date: Fri, 4 Mar 2022 18:28:36 +0100 Message-Id: <20220304172840.66057-7-twiederh@redhat.com> In-Reply-To: <20220304172840.66057-1-twiederh@redhat.com> References: <20220304172840.66057-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646414994086100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/admin/admin_server_dispatch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dis= patch.c index f533fcf539..893c7f1de2 100644 --- a/src/admin/admin_server_dispatch.c +++ b/src/admin/admin_server_dispatch.c @@ -165,9 +165,9 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UN= USED, struct daemonAdmClientPrivate *priv =3D virNetServerClientGetPrivateData(client); int ret =3D -1; + VIR_LOCK_GUARD lock =3D virLockGuardLock(&priv->lock); =20 VIR_DEBUG("priv=3D%p dmn=3D%p", priv, priv->dmn); - virMutexLock(&priv->lock); =20 flags =3D args->flags; virCheckFlagsGoto(0, cleanup); @@ -176,7 +176,6 @@ adminDispatchConnectOpen(virNetServer *server G_GNUC_UN= USED, cleanup: if (ret < 0) virNetMessageSaveError(rerr); - virMutexUnlock(&priv->lock); return ret; } =20 --=20 2.31.1