From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: Locking problem in KVM (or MM) Date: Wed, 16 Jan 2013 21:31:17 -0200 Message-ID: <20130116233117.GA16848@amt.cnet> References: <20130116144125.7f5a91e6@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gleb Natapov , kvm@vger.kernel.org To: Stephen Hemminger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62418 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901Ab3AQMgp (ORCPT ); Thu, 17 Jan 2013 07:36:45 -0500 Content-Disposition: inline In-Reply-To: <20130116144125.7f5a91e6@nehalam.linuxnetplumber.net> Sender: kvm-owner@vger.kernel.org List-ID: Appears to be related to https://lkml.org/lkml/2013/1/15/542 On Wed, Jan 16, 2013 at 02:41:25PM -0800, Stephen Hemminger wrote: > 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