From nobody Sat Nov 23 07:13:42 2024 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=1681913569; cv=none; d=zohomail.com; s=zohoarc; b=f5l9dshwR4je4ogH2eoEDpFyqrBsfkoCB9weaik5wDjaFUwLzFHVFeRL1EqPbEaaz+qHrmlVhtCOsX1Hudo1DRaWhIMhH2CcNIm57MR/XaxGoLkAPjAahQRua/fuinz15uF6ZFjexTkn+YIiMKWp2g/SUjN3ydosA6/Eu+f708Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681913569; 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=5tQd25OrmPMbsJ4nQR3u8kZcOwqINHdzUQ27LAcKlzM=; b=Tlpc/MJ8PYusWidHT9UQhhCeK1Z/s1qiqB3m7nnwVEdEPNrt/WvJCLrCIyAR/tKqtoCnibSGRenzC5KrMG9GEAEO9+zD0ecYau2L5rbEBk2q2pZ22mptQBphtJabdOvcmff70ERH0dkPsvVQAW9eS8c5xHjb8kX/FXiUTHn5zNc= 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 1681913569216494.1820119447086; Wed, 19 Apr 2023 07:12:49 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-SabB_W49Oxm72doJrs-VPg-1; Wed, 19 Apr 2023 10:12:46 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 605258028A5; Wed, 19 Apr 2023 14:12:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id F400A40C2064; Wed, 19 Apr 2023 14:12:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C1BD019465B1; Wed, 19 Apr 2023 14:12:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D09C219465B1 for ; Wed, 19 Apr 2023 14:07:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C1CB81410F1C; Wed, 19 Apr 2023 14:07:27 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8BA21410F1F for ; Wed, 19 Apr 2023 14:07:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9BD10884342 for ; Wed, 19 Apr 2023 14:07:27 +0000 (UTC) Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-mauGPk0eOn-H0_2m-FpSOw-1; Wed, 19 Apr 2023 10:07:26 -0400 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-63779b48340so4335982b3a.3 for ; Wed, 19 Apr 2023 07:07:25 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id v12-20020aa7808c000000b0062bae1101c5sm10970624pff.202.2023.04.19.07.07.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:07:23 -0700 (PDT) Received: from wheatley.. (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id DB004FB3864F for ; Wed, 19 Apr 2023 16:07:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681913568; 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=5tQd25OrmPMbsJ4nQR3u8kZcOwqINHdzUQ27LAcKlzM=; b=ELXqgO0oZ2wkfK5atqGMviRHFrzbXGMUh1fxiZYVZsWffS3IhyYklNojDHtzFwwVXQn5Gu KmV5IDZJkLALda5OmswkRYbhh5ZhmRIMnqz8KJDNOz8MrpCEPL4kQ4uD4q+EedL9yfesPS DUlKz9iaBQqJ1mY19IvBq5u9iFARHCI= X-MC-Unique: SabB_W49Oxm72doJrs-VPg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: mauGPk0eOn-H0_2m-FpSOw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913244; x=1684505244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5tQd25OrmPMbsJ4nQR3u8kZcOwqINHdzUQ27LAcKlzM=; b=VBLEJ3AYkGnNiXmqSEgZiq6unlungQi/ZDiEfBBvN2rgTsL6kyZSKPHv6NBZug330l /m97v8J4HZQjYdp89D/xsDMLgi3L6oBIdp0XXAXPptKxCx1hp78iktUISCW2G+XlKPAG tbADBNjvWRIvgxJRN3Jo9wl2pV6UFT1bI6iIvlUYS8S7EMHjUKYf+xAsfHa6U9BXASzM Pbec5azSasexr/mwAyi2O866I5z+mLml307E4VV+qEK1/QYbsLmps/qrCoaWL9LBGOkK GLyGJOteJbTvzbbQZE/AVj8JaklTJLjoxVQ1vz0SH4bljHX4Px/+OZATJTyPk28vGqF5 0r+w== X-Gm-Message-State: AAQBX9fzHa42gsieg9hcIlzD8ksOO1lk6jvr/N5a1LDMY+2ylTQiEQab FQ8tIV7FCCul2ff/qDB6VCfFYYZ+yTBulnofcFzzDUieIiOdT8XjUUEAMbNhc5jN2zB/uDJtxtx evMFNl/nSiZboQs9MHucK+x0Bd4Tb1QM/5eDZ3BOC8KjoJ8Ldw8eWQCmtaaggEReWVmSlIraSFw lKSJhahQ== X-Received: by 2002:a05:6a00:1956:b0:63b:64f7:45a0 with SMTP id s22-20020a056a00195600b0063b64f745a0mr4189956pfk.12.1681913244291; Wed, 19 Apr 2023 07:07:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ajFBv8KQkUNGhtzHwUz2z12jS4VKfsztxRavDQji3w/8g2tJHyTO2TYaQHT+Ap3FN+ce5VRw== X-Received: by 2002:a05:6a00:1956:b0:63b:64f7:45a0 with SMTP id s22-20020a056a00195600b0063b64f745a0mr4189935pfk.12.1681913243970; Wed, 19 Apr 2023 07:07:23 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH 5/7] qemu: Check all watchdogs for iTCO duplicates Date: Wed, 19 Apr 2023 16:07:08 +0200 Message-Id: <867e374d4a3b8dc67cbb55aaf141a8cf79871fb1.1681913144.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 1681913570177100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The loop initially skipped the first one because it was mainly checking the incompatible actions, but was then modified to also check the duplicity of iTCO watchdogs. While at it change the type of the iteration variable to the usual size_t. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2187133 Signed-off-by: Martin Kletzander --- src/qemu/qemu_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 6ebd2ba0101f..a03f7056b191 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1111,9 +1111,9 @@ static int qemuValidateDomainDefWatchdogs(const virDomainDef *def) { bool found_itco =3D false; - ssize_t i =3D 0; + size_t i =3D 0; =20 - for (i =3D 1; i < def->nwatchdogs; i++) { + for (i =3D 0; i < def->nwatchdogs; i++) { /* We could theoretically support different watchdogs having dump = and * pause, but let's be honest, we support multiple watchdogs only * because we need to be able to add a second, implicit one, not b= ecause --=20 2.40.0