From: "Christoph Schlameuss" <schlameuss@linux.ibm.com>
To: "Claudio Imbrenda" <imbrenda@linux.ibm.com>,
<linux-kernel@vger.kernel.org>
Cc: <kvm@vger.kernel.org>, <linux-s390@vger.kernel.org>,
<borntraeger@de.ibm.com>, <frankja@linux.ibm.com>,
<david@kernel.org>, <seiden@linux.ibm.com>, <nrb@linux.ibm.com>,
<schlameuss@linux.ibm.com>, <gra@linux.ibm.com>
Subject: Re: [PATCH v1 1/3] KVM: s390: vsie: Fix memory leak when unshadowing
Date: Thu, 07 May 2026 10:40:50 +0200 [thread overview]
Message-ID: <DICB6CAPDAAJ.3QMED51RIB4HD@linux.ibm.com> (raw)
In-Reply-To: <20260506141159.154240-2-imbrenda@linux.ibm.com>
On Wed May 6, 2026 at 4:11 PM CEST, Claudio Imbrenda wrote:
> When performing a partial unshadowing, the rmap was being leaked.
>
> Add the missing kfree().
>
> Fixes: a2c17f9270cc ("KVM: s390: New gmap code")
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
> arch/s390/kvm/gmap.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/gmap.c b/arch/s390/kvm/gmap.c
> index 3c26e35af0ef..fd1927761980 100644
> --- a/arch/s390/kvm/gmap.c
> +++ b/arch/s390/kvm/gmap.c
> @@ -1143,8 +1143,10 @@ void _gmap_handle_vsie_unshadow_event(struct gmap *parent, gfn_t gfn)
> }
> scoped_guard(spinlock, &sg->host_to_rmap_lock)
> head = radix_tree_delete(&sg->host_to_rmap, gfn);
> - gmap_for_each_rmap_safe(rmap, rnext, head)
> + gmap_for_each_rmap_safe(rmap, rnext, head) {
> gmap_unshadow_level(sg, rmap->r_gfn, rmap->level);
> + kfree(rmap);
> + }
> }
> }
>
next prev parent reply other threads:[~2026-05-07 8:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 14:11 [PATCH v1 0/3] KVM: s390: some vSIE and UCONTROL fixes Claudio Imbrenda
2026-05-06 14:11 ` [PATCH v1 1/3] KVM: s390: vsie: Fix memory leak when unshadowing Claudio Imbrenda
2026-05-07 8:40 ` Christoph Schlameuss [this message]
2026-05-06 14:11 ` [PATCH v1 2/3] KVM: s390: Fix memory leak in UCONTROL path Claudio Imbrenda
2026-05-06 14:11 ` [PATCH v1 3/3] KVM: s390: vsie: Fix unshadowing logic Claudio Imbrenda
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=DICB6CAPDAAJ.3QMED51RIB4HD@linux.ibm.com \
--to=schlameuss@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=gra@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=seiden@linux.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.