From nobody Mon Feb 9 00:27:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1611590761; cv=none; d=zohomail.com; s=zohoarc; b=ERpnzwugAa853nFKRhe/kZcebWD0F3bD2cPxPU0UXlvcul2Z0pLJT+Wub3rXGboXOdAkM+I+fXOrEfBDd6QEuI3p67Yi2eOCEqraDfw8B+Ra7BDzYzCXN1xejLJSft1oYKPa/p9Hzml2fPMXbIQ/E3agk03IROtWnppYXOs6uIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611590761; 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=YMzSMmND8ylD3sBJcb8cNRtYBOUPiy+doDsdZ6UpMdU=; b=YzJKRMsc/7FuGQpXGh7PJWKiNCp7JCDz2ejEqk91ZXyn8beAWGtMaWYCJ4GEb+HsxpDpo+JJptUorQw5qcq+3ulEovxMPDxO6YLj9kqfqN6QvGFTVIcLC89+lqtl2Iu4Qyr7/t0iy6qGtjiXKSK6264cTnnxEn8ahf69lWSre/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611590761073809.3535969187566; Mon, 25 Jan 2021 08:06:01 -0800 (PST) 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-116-l2C7L621M2ygV5h6dqYddw-1; Mon, 25 Jan 2021 11:05:54 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63CD9107ACF9; Mon, 25 Jan 2021 16:05:48 +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 40F6B5F9AC; Mon, 25 Jan 2021 16:05:48 +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 F014F4BB7B; Mon, 25 Jan 2021 16:05:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10PG5cE9018266 for ; Mon, 25 Jan 2021 11:05:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C6315D9DE; Mon, 25 Jan 2021 16:05:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C3D55D9DB for ; Mon, 25 Jan 2021 16:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611590760; 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=YMzSMmND8ylD3sBJcb8cNRtYBOUPiy+doDsdZ6UpMdU=; b=eqClgtH5g0zfswNvZBnuzg1dDjHM2lOI+y+V+jN8R3qQJfEdCaObN/V9HaRvlmcRHGSRx7 LlkI8BcKW4GFgF17LqWj67ugRk5gRPnM6XXVFjou/6rAKtR/mOJcTrLR3uDyi0BbCD5e7+ yknEQdsiLZ9iA+jjbdgGFfs7HElw6kQ= X-MC-Unique: l2C7L621M2ygV5h6dqYddw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/12] virt-aa-helper: Don't probe image metadata for terminated chains Date: Mon, 25 Jan 2021 17:05:19 +0100 Message-Id: <5eefadaa094b3bd862b096c5665982c8f7278f47.1611590679.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 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" A terminated chain has a virStorageSource with type =3D=3D VIR_STORAGE_TYPE_NONE at the end. Since virStorageSourceHasBacking is explicitly returning false in that case we'd probe the chain needlessly. Just check whether src->backingStore is non-NULL. Signed-off-by: Peter Krempa --- src/security/virt-aa-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d3abe37a8c..d33bacde5d 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -938,7 +938,7 @@ get_files(vahControl * ctl) /* XXX - if we knew the qemu user:group here we could send it in * so that the open could be re-tried as that user:group. */ - if (!virStorageSourceHasBacking(disk->src)) + if (!disk->src->backingStore) virStorageSourceGetMetadata(disk->src, -1, -1, false); /* XXX should handle open errors more careful than just ignoring = them. --=20 2.29.2