On Wed, 24 Jan 2018 13:41:00 +0100 Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote: > Some parts of the cmma migration bitmap is already protected > with the kvm->lock (e.g. the migration start). On the other > hand the read of the cmma bits is not protected against a > concurrent free, neither is the emulation of the ESSA instruction. > Let's extend the locking to all related ioctls by using > the slots lock and wait for the freeing until all unlocked > users have finished (those hold kvm->srcu for read). > > Reported-by: David Hildenbrand <david@xxxxxxxxxx> > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx # 4.13+ > Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode) > Reviewed-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxxxxxxx> > --- > v1->v2: fix comments in kvm_s390_vm_[start|stop]_migration > arch/s390/kvm/kvm-s390.c | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html