Skip to contentSkip to conversation

ia64 vcpu_reset() do not call kmalloc() with irqs disabled

PATCH Applied Jes Sorensen 3 participants 3 messages Apr 17, 2009 – Apr 20, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64 vcpu_reset() do not call kmalloc() with irqs disabled

Hi,

Here we go again, another case where we were calling kmalloc() through vcpu_reset() while local interrupts were disabled.

Cheers,
Jes

Restore local irq enabled state before calling kvm_arch_vcpu_init(), which calls kmalloc(GFP_KERNEL).

---
 arch/ia64/kvm/kvm-ia64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kvm/kvm-ia64.c +1 -1
Index: linux-2.6.git/arch/ia64/kvm/kvm-ia64.c
===================================================================
@@ -1919,6 +1919,7 @@
 	long psr;
 	local_irq_save(psr);
 	r = kvm_insert_vmm_mapping(vcpu);
+	local_irq_restore(psr);
 	if (r)
 		goto fail;
 
@@ -1931,7 +1932,6 @@
 	kvm_purge_vmm_mapping(vcpu);
 	r = 0;
 fail:
-	local_irq_restore(psr);
 	return r;
 }
 
Acked-by on v1 1/1
#1 lore raw

RE: [patch] ia64 vcpu_reset() do not call kmalloc() with irqs

Thanks, Jes!

Quoted 7 lines · Jes Sorensen

Hi,

Here we go again, another case where we were calling kmalloc() through vcpu_reset() while local interrupts were disabled.

Cheers,
Jes

Applied
#2 lore raw
In reply to Jes Sorensen
Quoted 4 lines · Jes Sorensen

Hi,

Here we go again, another case where we were calling kmalloc() through vcpu_reset() while local interrupts were disabled.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function