Re: [PATCH v1 3/3] KVM: s390: vsie: Fix race in acquire_gmap_shadow()
From: Christoph Schlameuss
Date: Mon Feb 09 2026 - 12:48:35 EST
On Fri Feb 6, 2026 at 3:35 PM CET, Claudio Imbrenda wrote:
> The shadow gmap returned by gmap_create_shadow() could get dropped
> before taking the gmap->children_lock. This meant that the shadow gmap
> was sometimes being used while its reference count was 0.
>
> Fix this by taking the additional reference inside gmap_create_shadow()
> while still holding gmap->children_lock, instead of afterwards.
>
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Reviewed-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>
> ---
> arch/s390/kvm/gmap.c | 15 ++++++++++++---
> arch/s390/kvm/vsie.c | 6 +++++-
> 2 files changed, 17 insertions(+), 4 deletions(-)