)]}'
{
  "commit": "eb94cd96e05d6c65a07937e66a04ea265c1b767d",
  "tree": "0432ec8db57798b5212fa2200fe1293b01bd3361",
  "parents": [
    "c0a5f4a05af588a0f9951f8d24e2564b09501918"
  ],
  "author": {
    "name": "Cyrill Gorcunov",
    "email": "gorcunov@openvz.org",
    "time": "Thu May 17 17:03:25 2012 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Thu May 17 18:00:51 2012 -0700"
  },
  "message": "fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries\n\nmap_files/ entries are never supposed to be executed, still curious\nminds might try to run them, which leads to the following deadlock\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\n  [ INFO: possible circular locking dependency detected ]\n  3.4.0-rc4-24406-g841e6a6 #121 Not tainted\n  -------------------------------------------------------\n  bash/1556 is trying to acquire lock:\n   (\u0026sb-\u003es_type-\u003ei_mutex_key#8){+.+.+.}, at: do_lookup+0x267/0x2b1\n\n  but task is already holding lock:\n   (\u0026sig-\u003ecred_guard_mutex){+.+.+.}, at: prepare_bprm_creds+0x2d/0x69\n\n  which lock already depends on the new lock.\n\n  the existing dependency chain (in reverse order) is:\n\n  -\u003e #1 (\u0026sig-\u003ecred_guard_mutex){+.+.+.}:\n         validate_chain+0x444/0x4f4\n         __lock_acquire+0x387/0x3f8\n         lock_acquire+0x12b/0x158\n         __mutex_lock_common+0x56/0x3a9\n         mutex_lock_killable_nested+0x40/0x45\n         lock_trace+0x24/0x59\n         proc_map_files_lookup+0x5a/0x165\n         __lookup_hash+0x52/0x73\n         do_lookup+0x276/0x2b1\n         walk_component+0x3d/0x114\n         do_last+0xfc/0x540\n         path_openat+0xd3/0x306\n         do_filp_open+0x3d/0x89\n         do_sys_open+0x74/0x106\n         sys_open+0x21/0x23\n         tracesys+0xdd/0xe2\n\n  -\u003e #0 (\u0026sb-\u003es_type-\u003ei_mutex_key#8){+.+.+.}:\n         check_prev_add+0x6a/0x1ef\n         validate_chain+0x444/0x4f4\n         __lock_acquire+0x387/0x3f8\n         lock_acquire+0x12b/0x158\n         __mutex_lock_common+0x56/0x3a9\n         mutex_lock_nested+0x40/0x45\n         do_lookup+0x267/0x2b1\n         walk_component+0x3d/0x114\n         link_path_walk+0x1f9/0x48f\n         path_openat+0xb6/0x306\n         do_filp_open+0x3d/0x89\n         open_exec+0x25/0xa0\n         do_execve_common+0xea/0x2f9\n         do_execve+0x43/0x45\n         sys_execve+0x43/0x5a\n         stub_execve+0x6c/0xc0\n\nThis is because prepare_bprm_creds grabs task-\u003esignal-\u003ecred_guard_mutex\nand when do_lookup happens we try to grab task-\u003esignal-\u003ecred_guard_mutex\nagain in lock_trace.\n\nFix it using plain ptrace_may_access() helper in proc_map_files_lookup()\nand in proc_map_files_readdir() instead of lock_trace(), the caller must\nbe CAP_SYS_ADMIN granted anyway.\n\nSigned-off-by: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nReported-by: Sasha Levin \u003clevinsasha928@gmail.com\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nCc: Vasiliy Kulikov \u003csegoon@openwall.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1c8b280146d7a0956dddd1f06e431f49671bd269",
      "old_mode": 33188,
      "old_path": "fs/proc/base.c",
      "new_id": "8e139c90f9fddce3ed4b76d0b324bb13ded1f912",
      "new_mode": 33188,
      "new_path": "fs/proc/base.c"
    }
  ]
}
