public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Schlameuss" <schlameuss@linux.ibm.com>
To: "Claudio Imbrenda" <imbrenda@linux.ibm.com>, <kvm@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-s390@vger.kernel.org>,
	<borntraeger@de.ibm.com>, <frankja@linux.ibm.com>,
	<nsg@linux.ibm.com>, <nrb@linux.ibm.com>, <seiden@linux.ibm.com>,
	<gra@linux.ibm.com>, <schlameuss@linux.ibm.com>,
	<hca@linux.ibm.com>, <svens@linux.ibm.com>,
	<agordeev@linux.ibm.com>, <gor@linux.ibm.com>, <david@kernel.org>,
	<gerald.schaefer@linux.ibm.com>
Subject: Re: [PATCH v1 2/3] KVM: s390: vsie: Fix race in walk_guest_tables()
Date: Mon, 09 Feb 2026 18:27:23 +0100	[thread overview]
Message-ID: <DGALW3FURCY8.DRKU9407VTTO@linux.ibm.com> (raw)
In-Reply-To: <20260206143553.14730-3-imbrenda@linux.ibm.com>

On Fri Feb 6, 2026 at 3:35 PM CET, Claudio Imbrenda wrote:
> It is possible that walk_guest_tables() is called on a shadow gmap that
> has been removed already, in which case its parent will be NULL.
>
> In such case, return -EAGAIN and let the callers deal with it.
>
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

> ---
>  arch/s390/kvm/gaccess.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
> index 67de47a81a87..4630b2a067ea 100644
> --- a/arch/s390/kvm/gaccess.c
> +++ b/arch/s390/kvm/gaccess.c
> @@ -1287,7 +1287,10 @@ static int walk_guest_tables(struct gmap *sg, unsigned long saddr, struct pgtwal
>  	union asce asce;
>  	int rc;
>  
> +	if (!parent)
> +		return -EAGAIN;
>  	kvm = parent->kvm;
> +	WARN_ON(!kvm);
>  	asce = sg->guest_asce;
>  	entries = get_entries(w);
>  


  parent reply	other threads:[~2026-02-09 17:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 14:35 [PATCH v1 0/3] KVM: s390: Three small fixes Claudio Imbrenda
2026-02-06 14:35 ` [PATCH v1 1/3] KVM: s390: Use guest address to mark guest page dirty Claudio Imbrenda
2026-02-06 14:56   ` Janosch Frank
2026-02-06 16:29   ` Steffen Eiden
2026-02-09 17:20   ` Christoph Schlameuss
2026-02-06 14:35 ` [PATCH v1 2/3] KVM: s390: vsie: Fix race in walk_guest_tables() Claudio Imbrenda
2026-02-06 15:12   ` Janosch Frank
2026-02-09 17:27   ` Christoph Schlameuss [this message]
2026-02-06 14:35 ` [PATCH v1 3/3] KVM: s390: vsie: Fix race in acquire_gmap_shadow() Claudio Imbrenda
2026-02-09 17:42   ` Christoph Schlameuss

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=DGALW3FURCY8.DRKU9407VTTO@linux.ibm.com \
    --to=schlameuss@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@kernel.org \
    --cc=frankja@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=gra@linux.ibm.com \
    --cc=hca@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=nsg@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    --cc=svens@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox