KVM: s390: bail out early on fatal signal in dirty logging
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 3 Feb 2016 10:12:34 +0000 (11:12 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 10 Feb 2016 12:12:57 +0000 (13:12 +0100)
A KVM_GET_DIRTY_LOG ioctl might take a long time.
This can result in fatal signals seemingly being ignored.
Lets bail out during the dirty bit sync, if a fatal signal
is pending.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c

index bb99ca28eb6612493675d2eb9f6625f4dbfa929b..28bd5ea1b08f2082a77e78047cd5eb6f650fff29 100644 (file)
@@ -281,6 +281,8 @@ static void kvm_s390_sync_dirty_log(struct kvm *kvm,
 
                if (gmap_test_and_clear_dirty(address, gmap))
                        mark_page_dirty(kvm, cur_gfn);
+               if (fatal_signal_pending(current))
+                       return;
                cond_resched();
        }
 }