From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Locking problem in KVM (or MM) Date: Wed, 16 Jan 2013 14:41:25 -0800 Message-ID: <20130116144125.7f5a91e6@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti , Gleb Natapov Return-path: Received: from mail-da0-f45.google.com ([209.85.210.45]:42913 "EHLO mail-da0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757681Ab3APWmx (ORCPT ); Wed, 16 Jan 2013 17:42:53 -0500 Received: by mail-da0-f45.google.com with SMTP id w4so780645dam.32 for ; Wed, 16 Jan 2013 14:42:53 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: Lockdep splat, appears to be KVM related with 3.8-rc1 [24428.429305] [24428.429308] ============================================= [24428.429309] [ INFO: possible recursive locking detected ] [24428.429312] 3.8.0-rc1-net-next+ #4 Tainted: G W [24428.429312] --------------------------------------------- [24428.429313] kvm/7355 is trying to acquire lock: [24428.429314] (&anon_vma->rwsem){++++..}, at: [] mm_take_all _locks+0x102/0x14e [24428.429321] [24428.429321] but task is already holding lock: [24428.429322] (&anon_vma->rwsem){++++..}, at: [] mm_take_all _locks+0x102/0x14e [24428.429325] [24428.429325] other info that might help us debug this: [24428.429326] Possible unsafe locking scenario: [24428.429326] [24428.429327] CPU0 [24428.429327] ---- [24428.429328] lock(&anon_vma->rwsem); [24428.429329] lock(&anon_vma->rwsem); [24428.429331] [24428.429331] *** DEADLOCK *** [24428.429331] [24428.429332] May be due to missing lock nesting notation [24428.429332] [24428.429333] 4 locks held by kvm/7355: [24428.429334] #0: (&mm->mmap_sem){++++++}, at: [] do_mmu_no tifier_register+0x65/0x12c [24428.429338] #1: (mm_all_locks_mutex){+.+...}, at: [] mm_t ake_all_locks+0x39/0x14e [24428.429341] #2: (&mapping->i_mmap_mutex){+.+...}, at: [] mm_take_all_locks+0xa1/0x14e [24428.429344] #3: (&anon_vma->rwsem){++++..}, at: [] mm_tak e_all_locks+0x102/0x14e [24428.429347] [24428.429347] stack backtrace: [24428.429348] Pid: 7355, comm: kvm Tainted: G W 3.8.0-rc1-net-next+ # 4 [24428.429349] Call Trace: [24428.429354] [] __lock_acquire+0x569/0xe12 [24428.429356] [] lock_acquire+0xd7/0x123 [24428.429358] [] ? mm_take_all_locks+0x102/0x14e [24428.429361] [] down_write+0x49/0x58 [24428.429363] [] ? mm_take_all_locks+0x102/0x14e [24428.429365] [] ? _mutex_lock_nest_lock+0x40/0x45 [24428.429366] [] mm_take_all_locks+0x102/0x14e [24428.429369] [] do_mmu_notifier_register+0x6d/0x12c [24428.429371] [] mmu_notifier_register+0x13/0x15 [24428.429373] [] kvm_dev_ioctl+0x277/0x3e4 [24428.429376] [] vfs_ioctl+0x26/0x39 [24428.429378] [] do_vfs_ioctl+0x40f/0x452 [24428.429381] [] ? time_hardirqs_off+0x15/0x2a [24428.429383] [] ? error_sti+0x5/0x6 [24428.429385] [] ? trace_hardirqs_off_caller+0x3f/0x9e [24428.429388] [] ? fget_light+0x3d/0x9d [24428.429389] [] sys_ioctl+0x57/0x86 [24428.429393] [] ? trace_hardirqs_on_thunk+0x3a/0x3f [24428.429395] [] system_call_fastpath+0x16/0x1b