From nobody Tue Feb 10 12:58:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1672217813; cv=none; d=zohomail.com; s=zohoarc; b=I++F3mLm0SsNzXwVLX2cHPGwQjrQKqtPj7Nqzi7DsT09aYjgyoLLNZ287V81hq5imtMcG6DrMd8hfPc1ZTJK97M3j7S7Ygwd42JOhOh316OVXWxIDiDxRkYWezWNreqEBcGhD/SRUF3mK9PKPe9KIB4dy4t8iRXyKkIxBhFT0DM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672217813; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=igMq8wsPJF/sG0mrPQ+5YG4LkZnbdjCb4xPHg+nGe1s=; b=VfcYqDpVtPEW6LO/vzPnQmHRycRhB3KDH8wuz0G/1t2TxbcWGjGLPrabCmiXi1xRYH+mhwyiv7nRWxznJt/FD4Ig9ZgBg5vk4mTA9BoI9/D6cLU6DG9fz0I+zdko4ewId/h+Zfo/zVlQwseOagd1vBE+RfFKIWJsawFLH8vi+WY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1672217813395770.4413781224141; Wed, 28 Dec 2022 00:56:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pASEh-0003pm-PQ; Wed, 28 Dec 2022 03:56:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pASEe-0003ns-EE for qemu-devel@nongnu.org; Wed, 28 Dec 2022 03:56:28 -0500 Received: from mga03.intel.com ([134.134.136.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pASEc-00048h-SK for qemu-devel@nongnu.org; Wed, 28 Dec 2022 03:56:28 -0500 Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 00:56:25 -0800 Received: from chenyi-pc.sh.intel.com ([10.239.159.43]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 00:56:10 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672217786; x=1703753786; h=from:to:cc:subject:date:message-id; bh=QPQiGWEbPrvFwo+COnyvTdMfQeWkiAqIb+nq/cIt72E=; b=NedgFbS51MiAGP1zZI2rWixQq9Mi0yRI/DZOaDGSMk78r9p5U6Q1xIVM Hkgr2gHEPbmdqJPwD5YNaJxvXdQBUH7XtCwTbd9AnI7wyCnmCnuTLnLwl zHJ84HMFCu9ahcR8ncJX5dKHGzIuhFHYVfDFAY2pYWHJLG4Xpw31yf8WE k7yUEA73SR0GzvE+6oczN78r90d3wwUzpWpqW1facnEip7kL+fjMGBOh/ hFUcPR71wUeSChxqgr15fazqXe9jxnVWp7EbDw9nYu4nFuJho2uEk5ONX hNxN+NBuWinKcsouLHjLxhHieZbEChCsW1RhX+oB9G4xb3vSNFbcLZ0Cf Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="322816410" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="322816410" X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="655252618" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="655252618" From: Chenyi Qiang To: David Hildenbrand , "Michael S. Tsirkin" Cc: Chenyi Qiang , qemu-devel@nongnu.org Subject: [PATCH] virtio-mem: Fix the iterator variable in a vmem->rdl_list loop Date: Wed, 28 Dec 2022 17:03:12 +0800 Message-Id: <20221228090312.17276-1-chenyi.qiang@intel.com> X-Mailer: git-send-email 2.17.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=134.134.136.65; envelope-from=chenyi.qiang@intel.com; helo=mga03.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1672217814175000002 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It should be the variable rdl2 to revert the already-notified listeners. Fixes: 2044969f0b ("virtio-mem: Implement RamDiscardManager interface") Signed-off-by: Chenyi Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/virtio/virtio-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index d96bde1fab..88c9c10318 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -341,7 +341,7 @@ static int virtio_mem_notify_plug(VirtIOMEM *vmem, uint= 64_t offset, if (ret) { /* Notify all already-notified listeners. */ QLIST_FOREACH(rdl2, &vmem->rdl_list, next) { - MemoryRegionSection tmp =3D *rdl->section; + MemoryRegionSection tmp =3D *rdl2->section; =20 if (rdl2 =3D=3D rdl) { break; --=20 2.17.1