Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "jgross@suse.com" <jgross@suse.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"bp@alien8.de" <bp@alien8.de>,
	"haoxiang_li2024@163.com" <haoxiang_li2024@163.com>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>,
	"Ostrovsky, Boris" <boris.ostrovsky@oracle.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"tglx@kernel.org" <tglx@kernel.org>,
	"david.vrabel@citrix.com" <david.vrabel@citrix.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"oleksandr_tyshchenko@epam.com" <oleksandr_tyshchenko@epam.com>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] xen/grant-table: fix resource leak in gnttab_init()
Date: Thu, 19 Nov 2026 23:18:03 +0000	[thread overview]
Message-ID: <6e3ed5bd9de1764058a257dca9e8fd6ca9fa1175.camel@intel.com> (raw)
In-Reply-To: <20261117084325.1241735-1-haoxiang_li2024@163.com>

On Tue, 2026-11-17 at 16:43 +0800, Haoxiang Li wrote:
> For x86 PV guests, arch_gnttab_init() allocates virtual address areas
> and PTE pointer arrays for the shared and status frames. These
> resources are not released if the subsequent gnttab_setup() call fails.
> 
> Add arch_gnttab_free() and call it on this failure path before the
> existing cleanup. Provide an empty implementation for ARM, which
> is also used by ARM64.
> 
> Fixes: 162e37171276 ("x86/xen: safely map and unmap grant frames when in atomic context")
> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
> ---

If the PV guest hits this scenario can it survive? I don't know xen pv very
well. Does this means that the PV guest has no disk or network. If so, the user
is probably not concerned with a one time memory leak.

      reply	other threads:[~2026-11-19 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  8:43 [PATCH] xen/grant-table: fix resource leak in gnttab_init() Haoxiang Li
2026-11-19 23:18 ` Edgecombe, Rick P [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e3ed5bd9de1764058a257dca9e8fd6ca9fa1175.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=david.vrabel@citrix.com \
    --cc=haoxiang_li2024@163.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mingo@redhat.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox