From: Julia Lawall Date: Tue, 8 Jun 2010 16:58:11 +0000 (+0200) Subject: [S390] arch/s390/kvm: Use GFP_ATOMIC when a lock is held X-Git-Tag: cont_sys_log_2~11^2~1 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=9940fa80ce0e546646b057958960c5c6fd2bbbb2 [S390] arch/s390/kvm: Use GFP_ATOMIC when a lock is held The containing function is called from several places. At one of them, in the function __sigp_stop, the spin lock &fi->lock is held. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @gfp exists@ identifier fn; position p; @@ fn(...) { ... when != spin_unlock when any GFP_KERNEL@p ... when any } @locked@ identifier gfp.fn; @@ spin_lock(...) ... when != spin_unlock fn(...) @depends on locked@ position gfp.p; @@ - GFP_KERNEL@p + GFP_ATOMIC // Signed-off-by: Julia Lawall Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index eff3c59..702276f 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c @@ -113,7 +113,7 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action) { struct kvm_s390_interrupt_info *inti; - inti = kzalloc(sizeof(*inti), GFP_KERNEL); + inti = kzalloc(sizeof(*inti), GFP_ATOMIC); if (!inti) return -ENOMEM; inti->type = KVM_S390_SIGP_STOP;