From nobody Mon Apr 13 05:27:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=julian.vetter@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1771249464; cv=none; d=zohomail.com; s=zohoarc; b=lgupvAdusJZ6fHIJyQ8MI5TmACosMmwZB+jUZbpvcZB3ip8a9vudVlxErH0nROdCQnUpkH+Xkm/ZWftrKoXO+sEHN1SJWh7vXOydnEZDNvdTE3JGD88jvBd82cxFp1DZk+r9pR+FGopPUa78s8eqazyMHWxSwKWtdKSVzBBnzLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771249464; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=prpBvrYoPfoemUVfs3/BMcBIrBUZ71dlGXNF25SbH5I=; b=ZiX01q1JrK4dTpUq7Zcb9w6/L+wRyREIRqvZ/o8rjclRKa0tO3QI4QlZ11xic9xdhppFzuaGlSwE8YoCrMqTCPqoSVSUQD5CSgzI8SXoL0SBZH25WaJIdQhdbs61CEHHzu8hyrhSL6IFFIDmdmUw10PuA05q7rXx7ekx1UMyaUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=julian.vetter@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1771249464035174.82107108637967; Mon, 16 Feb 2026 05:44:24 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1234160.1537478 (Exim 4.92) (envelope-from ) id 1vrytO-0007hy-R3; Mon, 16 Feb 2026 13:44:02 +0000 Received: by outflank-mailman (output) from mailman id 1234160.1537478; Mon, 16 Feb 2026 13:44:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vrytO-0007hr-O7; Mon, 16 Feb 2026 13:44:02 +0000 Received: by outflank-mailman (input) for mailman id 1234160; Mon, 16 Feb 2026 13:44:01 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vrytN-0007hf-69 for xen-devel@lists.xenproject.org; Mon, 16 Feb 2026 13:44:01 +0000 Received: from mail187-15.suw11.mandrillapp.com (mail187-15.suw11.mandrillapp.com [198.2.187.15]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8b388506-0b3d-11f1-b163-2bf370ae4941; Mon, 16 Feb 2026 14:43:59 +0100 (CET) Received: from pmta09.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail187-15.suw11.mandrillapp.com (Mailchimp) with ESMTP id 4fF3s931BnzPm0PXq for ; Mon, 16 Feb 2026 13:43:57 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id dca80abff0c64da19efeaa21a1c9b379; Mon, 16 Feb 2026 13:43:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8b388506-0b3d-11f1-b163-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1771249437; x=1771519437; bh=prpBvrYoPfoemUVfs3/BMcBIrBUZ71dlGXNF25SbH5I=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=gycgvRLNqHG4dN5CpiEl4iAKMBqJsvs2GpOzKjUyG+YkCVGvplhpLUJTsmTR+HWp8 A7nk4UYOfiAx2wTYfOfTAaVJAlARxBBmou5LKREDV4VymT/ldpVcoYtpCKci5ZNEc5 KSEFskuVsjdpqqPzVNhXKUuAjKaV4BmPZgci4yE0rEvqS2QbWNiniVTNzWpYUakR6A GypHn7MWGD5Mcjj/mHWy10XZXZ0wUkM+yPG/mLXdPxFRNc1309w8cSY89o5dlq75vx 0dq7sOgnXpvXMveCvNolyRmnzTgtXzEbv4skvy1x4hO3jsXuym3JTV6d6bhoF2slB1 Jyd2QNb4fZK2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1771249437; x=1771509937; i=julian.vetter@vates.tech; bh=prpBvrYoPfoemUVfs3/BMcBIrBUZ71dlGXNF25SbH5I=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=lonCE8CtF0qoJnimvdGDV6amCnx65em5YnPoPbkg2+ud60LyMiIKZYBW6GZl/Fk0V xoeZ8Tn92tGnx9/fDdw4hbYDxKTV97xnY/kRaD6Zr5HK7gF1zw3YxAoqy25L9Xmtpe 0YVKv2hoICsIFOzDfimbtTb0KzLnA2wwXMVKaHnP7EzGwAvgCqtlu+iFVX/QgcUx4k H3Nq3Y59BGxS/qiIQsslGnw6uTQmNFgrIEj+v4V/cv7IBSeos+Flw/0Nf0WKhUlPks EEGpDo+9SinOtjrMgYzDSKQhZVWX5IUP0w52Zd6NlpZI9P8OP5E8hX3ILo1uS/G7j7 F9THbbL65o+Eg== From: "Julian Vetter" Subject: =?utf-8?Q?[PATCH=20v2=201/3]=20x86/ioreq:=20Add=20missing=20put=5Fpage=5Falloc=5Fref(page)?= X-Mailer: git-send-email 2.51.0 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1771249436235 To: xen-devel@lists.xenproject.org Cc: "Jan Beulich" , "Andrew Cooper" , "=?utf-8?Q?Roger=20Pau=20Monn=C3=A9?=" , "Anthony PERARD" , "Michal Orzel" , "Julien Grall" , "Stefano Stabellini" , "Julian Vetter" Message-Id: <20260216134334.3510048-2-julian.vetter@vates.tech> In-Reply-To: <20260216134334.3510048-1-julian.vetter@vates.tech> References: <20260216134334.3510048-1-julian.vetter@vates.tech> X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.dca80abff0c64da19efeaa21a1c9b379?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260216:md Date: Mon, 16 Feb 2026 13:43:57 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity julian.vetter@vates.tech) X-ZM-MESSAGEID: 1771249465764154100 Content-Type: text/plain; charset="utf-8" The page was allocated with MEMF_no_refcount. The MEMF_no_refcount flag means the page is allocated without a regular reference, but it still has the allocation reference. If get_page_and_type() fails, we still need to release the allocation reference. Otherwise the page would leak. domain_crash() doesn't free individual pages; it just marks the domain for destruction. The domain teardown will eventually free domain heap pages, but only those it can find. A page with a dangling alloc ref would prevent the page from being fully freed during domain cleanup. Signed-off-by: Julian Vetter --- Changes in v2: - New patch --- xen/common/ioreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c index f5fd30ce12..5d722c8d4e 100644 --- a/xen/common/ioreq.c +++ b/xen/common/ioreq.c @@ -287,6 +287,7 @@ static int ioreq_server_alloc_mfn(struct ioreq_server *= s, bool buf) * The domain can't possibly know about this page yet, so failure * here is a clear indication of something fishy going on. */ + put_page_alloc_ref(page); domain_crash(s->emulator); return -ENODATA; } --=20 2.51.0 -- Julian Vetter | Vates Hypervisor & Kernel Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech