Re: [PATCH 3/3] arch/s390/kvm: Use GFP_ATOMIC when a lock is held
On Mon, 31 May 2010 10:38:07 +0200 Christian Borntraeger wrote: > > The containing function is called from several places. At one of them, in > > the function __sigp_stop, the spin lock &fi->lock is held. > [...] > > Signed-off-by: Julia Lawall > > Acked-by: Christian Borntraeger Ok, I'll add the patch to git390. Thanks. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] 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. [...] > Signed-off-by: Julia Lawall Acked-by: Christian Borntraeger [...] > --- a/arch/s390/kvm/sigp.c > +++ b/arch/s390/kvm/sigp.c > @@ -113,7 +113,7 @@ static int __inject_sigp_stop(struct kvm > { > 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; -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] arch/s390/kvm: Use GFP_ATOMIC when a lock is held
From: Julia Lawall 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_ker...@p ... when any } @locked@ identifier gfp.fn; @@ spin_lock(...) ... when != spin_unlock fn(...) @depends on locked@ position gfp.p; @@ - gfp_ker...@p + GFP_ATOMIC // Signed-off-by: Julia Lawall --- arch/s390/kvm/sigp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -u -p a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c @@ -113,7 +113,7 @@ static int __inject_sigp_stop(struct kvm { 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; -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html