diff options
author | Christian Borntraeger <borntraeger@linux.ibm.com> | 2023-12-20 15:53:17 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@linux.ibm.com> | 2023-12-21 13:40:18 +0300 |
commit | fe752331d4b361d43cfd0b89534b4b2176057c32 (patch) | |
tree | 7b03d431acf5e8f9e08d6ab52736633ffccaf934 /scripts/gdb/linux/interrupts.py | |
parent | 4cdf351d3630a640ab6a05721ef055b9df62277f (diff) | |
download | linux-fe752331d4b361d43cfd0b89534b4b2176057c32.tar.xz |
KVM: s390: vsie: fix race during shadow creation
Right now it is possible to see gmap->private being zero in
kvm_s390_vsie_gmap_notifier resulting in a crash. This is due to the
fact that we add gmap->private == kvm after creation:
static int acquire_gmap_shadow(struct kvm_vcpu *vcpu,
struct vsie_page *vsie_page)
{
[...]
gmap = gmap_shadow(vcpu->arch.gmap, asce, edat);
if (IS_ERR(gmap))
return PTR_ERR(gmap);
gmap->private = vcpu->kvm;
Let children inherit the private field of the parent.
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Fixes: a3508fbe9dc6 ("KVM: s390: vsie: initial support for nested virtualization")
Cc: <stable@vger.kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20231220125317.4258-1-borntraeger@linux.ibm.com
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions