)]}'
{
  "commit": "7cd5a02f54f4c9d16cf7fdffa2122bc73bb09b43",
  "tree": "05b0be34c4dd02899c4f771e89795780465810a6",
  "parents": [
    "454ed842d55740160334efc9ad56cfef54ed37bc"
  ],
  "author": {
    "name": "Peter Zijlstra",
    "email": "a.p.zijlstra@chello.nl",
    "time": "Mon Aug 11 09:30:25 2008 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Mon Aug 11 09:30:25 2008 +0200"
  },
  "message": "mm: fix mm_take_all_locks() locking order\n\nLockdep spotted:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[ INFO: possible circular locking dependency detected ]\n2.6.27-rc1 #270\n-------------------------------------------------------\nqemu-kvm/2033 is trying to acquire lock:\n (\u0026inode-\u003ei_data.i_mmap_lock){----}, at: [\u003cffffffff802996cc\u003e] mm_take_all_locks+0xc2/0xea\n\nbut task is already holding lock:\n (\u0026anon_vma-\u003elock){----}, at: [\u003cffffffff8029967a\u003e] mm_take_all_locks+0x70/0xea\n\nwhich lock already depends on the new lock.\n\nthe existing dependency chain (in reverse order) is:\n\n-\u003e #1 (\u0026anon_vma-\u003elock){----}:\n       [\u003cffffffff8025cd37\u003e] __lock_acquire+0x11be/0x14d2\n       [\u003cffffffff8025d0a9\u003e] lock_acquire+0x5e/0x7a\n       [\u003cffffffff804c655b\u003e] _spin_lock+0x3b/0x47\n       [\u003cffffffff8029a2ef\u003e] vma_adjust+0x200/0x444\n       [\u003cffffffff8029a662\u003e] split_vma+0x12f/0x146\n       [\u003cffffffff8029bc60\u003e] mprotect_fixup+0x13c/0x536\n       [\u003cffffffff8029c203\u003e] sys_mprotect+0x1a9/0x21e\n       [\u003cffffffff8020c0db\u003e] system_call_fastpath+0x16/0x1b\n       [\u003cffffffffffffffff\u003e] 0xffffffffffffffff\n\n-\u003e #0 (\u0026inode-\u003ei_data.i_mmap_lock){----}:\n       [\u003cffffffff8025ca54\u003e] __lock_acquire+0xedb/0x14d2\n       [\u003cffffffff8025d397\u003e] lock_release_non_nested+0x1c2/0x219\n       [\u003cffffffff8025d515\u003e] lock_release+0x127/0x14a\n       [\u003cffffffff804c6403\u003e] _spin_unlock+0x1e/0x50\n       [\u003cffffffff802995d9\u003e] mm_drop_all_locks+0x7f/0xb0\n       [\u003cffffffff802a965d\u003e] do_mmu_notifier_register+0xe2/0x112\n       [\u003cffffffff802a96a8\u003e] mmu_notifier_register+0xe/0x10\n       [\u003cffffffffa0043b6b\u003e] kvm_dev_ioctl+0x11e/0x287 [kvm]\n       [\u003cffffffff802bd0ca\u003e] vfs_ioctl+0x2a/0x78\n       [\u003cffffffff802bd36f\u003e] do_vfs_ioctl+0x257/0x274\n       [\u003cffffffff802bd3e1\u003e] sys_ioctl+0x55/0x78\n       [\u003cffffffff8020c0db\u003e] system_call_fastpath+0x16/0x1b\n       [\u003cffffffffffffffff\u003e] 0xffffffffffffffff\n\nother info that might help us debug this:\n\n5 locks held by qemu-kvm/2033:\n #0:  (\u0026mm-\u003emmap_sem){----}, at: [\u003cffffffff802a95d0\u003e] do_mmu_notifier_register+0x55/0x112\n #1:  (mm_all_locks_mutex){--..}, at: [\u003cffffffff8029963e\u003e] mm_take_all_locks+0x34/0xea\n #2:  (\u0026anon_vma-\u003elock){----}, at: [\u003cffffffff8029967a\u003e] mm_take_all_locks+0x70/0xea\n #3:  (\u0026anon_vma-\u003elock){----}, at: [\u003cffffffff8029967a\u003e] mm_take_all_locks+0x70/0xea\n #4:  (\u0026anon_vma-\u003elock){----}, at: [\u003cffffffff8029967a\u003e] mm_take_all_locks+0x70/0xea\n\nstack backtrace:\nPid: 2033, comm: qemu-kvm Not tainted 2.6.27-rc1 #270\n\nCall Trace:\n [\u003cffffffff8025b7c7\u003e] print_circular_bug_tail+0xb8/0xc3\n [\u003cffffffff8025ca54\u003e] __lock_acquire+0xedb/0x14d2\n [\u003cffffffff80259bb1\u003e] ? add_lock_to_list+0x7e/0xad\n [\u003cffffffff8029967a\u003e] ? mm_take_all_locks+0x70/0xea\n [\u003cffffffff8029967a\u003e] ? mm_take_all_locks+0x70/0xea\n [\u003cffffffff8025d397\u003e] lock_release_non_nested+0x1c2/0x219\n [\u003cffffffff802996cc\u003e] ? mm_take_all_locks+0xc2/0xea\n [\u003cffffffff802996cc\u003e] ? mm_take_all_locks+0xc2/0xea\n [\u003cffffffff8025b202\u003e] ? trace_hardirqs_on_caller+0x4d/0x115\n [\u003cffffffff802995d9\u003e] ? mm_drop_all_locks+0x7f/0xb0\n [\u003cffffffff8025d515\u003e] lock_release+0x127/0x14a\n [\u003cffffffff804c6403\u003e] _spin_unlock+0x1e/0x50\n [\u003cffffffff802995d9\u003e] mm_drop_all_locks+0x7f/0xb0\n [\u003cffffffff802a965d\u003e] do_mmu_notifier_register+0xe2/0x112\n [\u003cffffffff802a96a8\u003e] mmu_notifier_register+0xe/0x10\n [\u003cffffffffa0043b6b\u003e] kvm_dev_ioctl+0x11e/0x287 [kvm]\n [\u003cffffffff8033f9f2\u003e] ? file_has_perm+0x83/0x8e\n [\u003cffffffff802bd0ca\u003e] vfs_ioctl+0x2a/0x78\n [\u003cffffffff802bd36f\u003e] do_vfs_ioctl+0x257/0x274\n [\u003cffffffff802bd3e1\u003e] sys_ioctl+0x55/0x78\n [\u003cffffffff8020c0db\u003e] system_call_fastpath+0x16/0x1b\n\nWhich the locking hierarchy in mm/rmap.c confirms as valid.\n\nFix this by first taking all the mapping-\u003ei_mmap_lock instances and then\ntake all anon_vma-\u003elock instances.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nAcked-by: Hugh Dickins \u003chugh@veritas.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5d09d08a41207f1004e377cc15ef1aa0e31c7864",
      "old_mode": 33188,
      "old_path": "mm/mmap.c",
      "new_id": "32a287b631d474b4436bf07f14517e1bcc707c0f",
      "new_mode": 33188,
      "new_path": "mm/mmap.c"
    }
  ]
}
