From nobody Mon Feb 9 00:30:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1618308146; cv=none; d=zohomail.com; s=zohoarc; b=XJI9bhJbZL7yIkgu+1mJCaPpNcEYcQUQKN36DALw3LNtyFaeGtVslRmxQDxoZRHzY+3NWOrG6t8LzJr7QyigMGdcPPa5Muqac7+DjCyQ2dQJir9A494THOj+SJjR2PfXmpt1wPBcUpWftbYB7Pc1bC6eykUwCNMNnmO0zXbuqmM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618308146; h=Content-Type:Content-Transfer-Encoding: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=8HqW8uEz4nqNsPqCWFRn8+7lnR0liiG4VBT7UHkJbAQ=; b=foQ5PoKhUoI+Myk9R0Bg+UdS8lrBrIKQJoO3/Np3b65al//RavVQslfAQMFVW7enN+wRnqNUnc9ViXJrkY5r0+UEP8yVH1bUMUCNF2GWlJvsanILlHXuIBmw3P3LyfDln8NOAcxa+FSvMA62ft4bEQsYt1Oz7GklexWmBI2rojQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618308146470331.3987353107185; Tue, 13 Apr 2021 03:02:26 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-Afs_dG4KOcmXwALrBxH0kg-1; Tue, 13 Apr 2021 06:02:22 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F31681746A; Tue, 13 Apr 2021 10:02:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6880A6F13B; Tue, 13 Apr 2021 10:02:17 +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 2A07F1806D1B; Tue, 13 Apr 2021 10:02:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13DA28Kj011388 for ; Tue, 13 Apr 2021 06:02:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id C236410023B5; Tue, 13 Apr 2021 10:02:08 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44CC810023B0 for ; Tue, 13 Apr 2021 10:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618308144; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=8HqW8uEz4nqNsPqCWFRn8+7lnR0liiG4VBT7UHkJbAQ=; b=Ks9bPHEkGafSRT6xK1xZs0TexcfKYl05FK84mtYrPms4/vRap6YfNZfY1KbLogdQNhBLWf WZe2ox3WTEKJb5FKb9zpcIFl+mkx3mG8UFcYhn7GopouvdD8PgHKiaHBY50k2VtgLPCQTz SDUn3+6+M8nkrW01uw7UKeqpHT8Aybs= X-MC-Unique: Afs_dG4KOcmXwALrBxH0kg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 5/6] nodedev: Mark device initialization complete even in case of an error Date: Tue, 13 Apr 2021 12:01:56 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.13 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) Content-Type: text/plain; charset="utf-8" To speed up nodedev driver initialization, the device enumeration is done in a separate thread. Once finished, the thread sets a boolean variable that allows public APIs to be called (instead of waiting for the thread to finish). However, if there's an error in the device enumeration thread then the control jumps over at the 'error' label and the boolean is never set. This means, that any virNodeDev*() API is stuck forever. Mark the initialization as complete (the thread is quitting anyway) and let the APIs proceed. Signed-off-by: Michal Privoznik --- src/node_device/node_device_udev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 68547c6986..1c5b80ea58 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1995,6 +1995,8 @@ nodeStateInitializeEnumerate(void *opaque) priv->threadQuit =3D true; virCondSignal(&priv->threadCond); virObjectUnlock(priv); + + nodeDeviceInitComplete(); } =20 =20 --=20 2.26.3