From nobody Mon May 6 19:46:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1569084950; cv=none; d=zoho.com; s=zohoarc; b=OZThiYcqQCuFhqzc4RhHvbsPuNT93Qh0F1Ev5wgvfxO51qPqd2FdIm3Y5VAQtGfhoz5gq1b6uK9bD/FaNsVV0TVNa4+zVzmAuDe2WzZVCZ0SG14kBuebKp7X+3VoMa72bDaky1FMNJe/68luRlpAkB8dQCCUHfaIrBOpEbb4kMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569084950; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=4+UX8/0GNm8Sgf6asx24vxqZgnz7m6TC8H5lVgh8Cv4=; b=KMz3W1nqw4pWotBQoNZ8/bFbiLDZn8TrVaGRd2525XAHLveuwXo7mWZ0Is2QxQ+S+qqyZ1IbbDKq4Zbs3OOsqbmOGhkoRBWThq2d6S2JdRw7TCv/clyT2ncldairbyjnOufp4tujXIn9xZRSO+ZLVie7NFAyjx2NkZCpG1t6I1M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1569084950353954.887064893681; Sat, 21 Sep 2019 09:55:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11D96308A968; Sat, 21 Sep 2019 16:55:47 +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 51EEF26FC0; Sat, 21 Sep 2019 16:55:45 +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 C92AB4E58A; Sat, 21 Sep 2019 16:55:39 +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 x8LGtaYj023722 for ; Sat, 21 Sep 2019 12:55:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 914935DA21; Sat, 21 Sep 2019 16:55:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C95E5D9E5 for ; Sat, 21 Sep 2019 16:55:34 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B6CD3084045 for ; Sat, 21 Sep 2019 16:55:33 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id z67so10674513qkb.12 for ; Sat, 21 Sep 2019 09:55:33 -0700 (PDT) Received: from localhost.localdomain ([2804:431:c7ca:b0a:a426:1d46:cfd5:a7bc]) by smtp.gmail.com with ESMTPSA id 139sm2875698qkf.14.2019.09.21.09.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2019 09:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=61oWjt1Hyzj5RK6E12ZBWXvWKpZ5FOMcvZwjhB4wOuc=; b=KJsJkNy/VbYiFgfZqXDS3MeNrRIOgmkhRW21z2LUXCSLRrvF1eqT6/VG2LBKYJZ9AI ztcIXg0r4Nax2Jmy4F464Nyuv23H8Yi61M0tuFIkKjhZBd0etBIoPnvLNAP7V4MkN/rO oI3aYA4NR1yrKs6Vqq9zVMF7vjXoM3WoFTjcVc8hlV+gqoCYLbBg/W/4iW+f8VhE0vpv yZSIK7hK6IxEyWpL3yYEm2xGxGm934e6j/CcReWnaAKvrchvnqKGEs97GENuACodcVwP KG3DzgKsj/lIhICA938IJG/V25znGu64qnM+iv+EnbYF8xbsrmFAXbwbMPG2xV34b6s0 zU+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=61oWjt1Hyzj5RK6E12ZBWXvWKpZ5FOMcvZwjhB4wOuc=; b=LbNvX/C/SwM0oXdqrvqHGjaPmB0jPbkqlaUnsMVNFhFRViBRn+ZNHt0Mu457k4XcLG U+6gNln/tA8K5nSiYzWvGWxZfLc2Iz7dyIql1KQqFAtnX8ezfuVYt45IQle4HDMXPQgF Kw38C5TG/yOqxj3arlAC7nLKwCFbvT7US2A+GqBmYH/+meRl1Eq+BZszR5xP7gaFJMA/ ZPDeAD51B0kyAx2gob7bIsfudB9FELH6dFBuFUOaWvNyvPZiwbJ6XtTMIltbFcrkUvwY 5ksvFJbktb4/SOvqqhqFIkW7ZX9ne0BToY+m1kJ5pvqt/70/baHAP72nCNbJlqq4MRr4 ZgIw== X-Gm-Message-State: APjAAAWn7YaIPu1ePwvYElMoBKqCO7MFV8ZavRNf4SSNp79RdnAHf/Ko 3gaEpAwm+9Yzi1RNqeIg1OevxsaCm+0= X-Google-Smtp-Source: APXvYqzE6ragXxYvySUo5vBzCVC6jqnD75gGFHQlli9QecKV6/A0/ei8JBVZOWEBL2k1UzfKeeRg1g== X-Received: by 2002:a37:9782:: with SMTP id z124mr1750808qkd.78.1569084931960; Sat, 21 Sep 2019 09:55:31 -0700 (PDT) From: jcfaracco@gmail.com To: libvir-list@redhat.com Date: Sat, 21 Sep 2019 13:55:22 -0300 Message-Id: <20190921165522.14574-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 21 Sep 2019 16:55:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 21 Sep 2019 16:55:33 +0000 (UTC) for IP:'209.85.222.196' DOMAIN:'mail-qk1-f196.google.com' HELO:'mail-qk1-f196.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.196 mail-qk1-f196.google.com 209.85.222.196 mail-qk1-f196.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Julio Faracco Subject: [libvirt] [PATCH] qemu: fix operation job association when qemuCaps is NULL. 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Sat, 21 Sep 2019 16:55:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Julio Faracco Function qemuMigrationEatCookie() calls qemuMigrationCookieXMLParseStr(), when qemuCaps is not set, function assumes priv as a NULL pointer. At the end, function tries to set job info operation to the same current job. But, if priv is NULL due to missing qemuCaps, code returns a Null Pointer Exception. This commit adds an extra check to verify it. Signed-off-by: Julio Faracco --- src/qemu/qemu_migration_cookie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 25d3fecd74..945b640e2c 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1538,7 +1538,8 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver, } } =20 - if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo) + if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo && + priv && priv->job.current) mig->jobInfo->operation =3D priv->job.current->operation; =20 return mig; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list