From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755058Ab1EKP54 (ORCPT ); Wed, 11 May 2011 11:57:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697Ab1EKP5x (ORCPT ); Wed, 11 May 2011 11:57:53 -0400 Message-ID: <4DCA7881.7040207@redhat.com> Date: Wed, 11 May 2011 14:52:33 +0300 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: OGAWA Hirofumi CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kvm: Fix kvm mmu_notifier initialization order References: <87fwomozbn.fsf@devron.myhome.or.jp> In-Reply-To: <87fwomozbn.fsf@devron.myhome.or.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/2011 03:28 AM, OGAWA Hirofumi wrote: > Like the following, mmu_notifier can be called after registering > immediately. So, kvm have to initialize kvm->mmu_lock before it. > > BUG: spinlock bad magic on CPU#0, kswapd0/342 > lock: ffff8800af8c4000, .magic: 00000000, .owner:/-1, .owner_cpu: 0 > Pid: 342, comm: kswapd0 Not tainted 2.6.39-rc5+ #1 > Call Trace: > [] spin_bug+0x9c/0xa3 > [] do_raw_spin_lock+0x29/0x13c > [] ? flush_tlb_others_ipi+0xaf/0xfd > [] _raw_spin_lock+0x9/0xb > [] kvm_mmu_notifier_clear_flush_young+0x2c/0x66 [kvm] > [] __mmu_notifier_clear_flush_young+0x2b/0x57 > [] page_referenced_one+0x88/0xea > [] page_referenced+0x1fc/0x256 > [] shrink_page_list+0x187/0x53a > [] shrink_inactive_list+0x1e0/0x33d > [] ? determine_dirtyable_memory+0x15/0x27 > [] ? call_function_single_interrupt+0xe/0x20 > [] shrink_zone+0x322/0x3de > [] ? zone_watermark_ok_safe+0xe2/0xf1 > [] kswapd+0x516/0x818 > [] ? shrink_zone+0x3de/0x3de > [] kthread+0x7d/0x85 > [] kernel_thread_helper+0x4/0x10 > [] ? __init_kthread_worker+0x37/0x37 > [] ? gs_change+0xb/0xb > Applied, thanks. -- error compiling committee.c: too many arguments to function