public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marcelo Tosatti <mtosatti@redhat.com>, Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Locking problem in KVM (or MM)
Date: Wed, 16 Jan 2013 14:41:25 -0800	[thread overview]
Message-ID: <20130116144125.7f5a91e6@nehalam.linuxnetplumber.net> (raw)

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: [<ffffffff811373f8>] mm_take_all
_locks+0x102/0x14e
[24428.429321] 
[24428.429321] but task is already holding lock:
[24428.429322]  (&anon_vma->rwsem){++++..}, at: [<ffffffff811373f8>] 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: [<ffffffff81148b64>] do_mmu_no
tifier_register+0x65/0x12c
[24428.429338]  #1:  (mm_all_locks_mutex){+.+...}, at: [<ffffffff8113732f>] mm_t
ake_all_locks+0x39/0x14e
[24428.429341]  #2:  (&mapping->i_mmap_mutex){+.+...}, at: [<ffffffff81137397>] 
mm_take_all_locks+0xa1/0x14e
[24428.429344]  #3:  (&anon_vma->rwsem){++++..}, at: [<ffffffff811373f8>] 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]  [<ffffffff810b82f0>] __lock_acquire+0x569/0xe12
[24428.429356]  [<ffffffff810b9025>] lock_acquire+0xd7/0x123
[24428.429358]  [<ffffffff811373f8>] ? mm_take_all_locks+0x102/0x14e
[24428.429361]  [<ffffffff814e490a>] down_write+0x49/0x58
[24428.429363]  [<ffffffff811373f8>] ? mm_take_all_locks+0x102/0x14e
[24428.429365]  [<ffffffff814e44d2>] ? _mutex_lock_nest_lock+0x40/0x45
[24428.429366]  [<ffffffff811373f8>] mm_take_all_locks+0x102/0x14e
[24428.429369]  [<ffffffff81148b6c>] do_mmu_notifier_register+0x6d/0x12c
[24428.429371]  [<ffffffff81148c50>] mmu_notifier_register+0x13/0x15
[24428.429373]  [<ffffffff81004ed9>] kvm_dev_ioctl+0x277/0x3e4
[24428.429376]  [<ffffffff8116471e>] vfs_ioctl+0x26/0x39
[24428.429378]  [<ffffffff8116501b>] do_vfs_ioctl+0x40f/0x452
[24428.429381]  [<ffffffff810f759f>] ? time_hardirqs_off+0x15/0x2a
[24428.429383]  [<ffffffff814e6d63>] ? error_sti+0x5/0x6
[24428.429385]  [<ffffffff810b5da0>] ? trace_hardirqs_off_caller+0x3f/0x9e
[24428.429388]  [<ffffffff8116d353>] ? fget_light+0x3d/0x9d
[24428.429389]  [<ffffffff811650b5>] sys_ioctl+0x57/0x86
[24428.429393]  [<ffffffff812c23de>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[24428.429395]  [<ffffffff814ed582>] system_call_fastpath+0x16/0x1b

             reply	other threads:[~2013-01-16 22:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 22:41 Stephen Hemminger [this message]
2013-01-16 23:31 ` Locking problem in KVM (or MM) Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130116144125.7f5a91e6@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox