diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index 9714add38852..3bfe1824ec2d 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -629,6 +629,11 @@ long kvm_gmem_populate(struct kvm *kvm, gfn_t start_gfn, void __user *src, long gfn_t gfn = start_gfn + i; kvm_pfn_t pfn; + if (signal_pending(current)) { + ret = -EINTR; + break; + } + ret = __kvm_gmem_get_pfn(file, slot, gfn, &pfn, &max_order, false); if (ret) break;