From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Date: Fri, 17 Apr 2009 14:43:27 +0000 Subject: [patch] ia64 vcpu_reset() do not call kmalloc() with irqs disabled Message-Id: <49E8958F.5060607@sgi.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------000207010008040501040401" List-Id: To: kvm-ia64@vger.kernel.org This is a multi-part message in MIME format. --------------000207010008040501040401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Here we go again, another case where we were calling kmalloc() through vcpu_reset() while local interrupts were disabled. Cheers, Jes --------------000207010008040501040401 Content-Type: text/x-patch; name="0006-kvm-ia64-vcpu-reset-sleep.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0006-kvm-ia64-vcpu-reset-sleep.patch" Restore local irq enabled state before calling kvm_arch_vcpu_init(), which calls kmalloc(GFP_KERNEL). Signed-off-by: Jes Sorensen --- arch/ia64/kvm/kvm-ia64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.git/arch/ia64/kvm/kvm-ia64.c =================================================================== --- linux-2.6.git.orig/arch/ia64/kvm/kvm-ia64.c +++ 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; } --------------000207010008040501040401--