)]}'
{
  "commit": "e9028b0ff2bad1954568604dc17725692c8524d6",
  "tree": "dbff742d39520574e5985930333f1d421282e080",
  "parents": [
    "5be0e9511990dc307670dc66a42073db96b20f26"
  ],
  "author": {
    "name": "Anton Blanchard",
    "email": "anton@samba.org",
    "time": "Thu Mar 23 02:59:20 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Thu Mar 23 07:38:02 2006 -0800"
  },
  "message": "[PATCH] fix scheduler deadlock\n\nWe have noticed lockups during boot when stress testing kexec on ppc64.\nTwo cpus would deadlock in scheduler code trying to grab already taken\nspinlocks.\n\nThe double_rq_lock code uses the address of the runqueue to order the\ntaking of multiple locks.  This address is a per cpu variable:\n\n\tif (rq1 \u003c rq2) {\n\t\tspin_lock(\u0026rq1-\u003elock);\n\t\tspin_lock(\u0026rq2-\u003elock);\n\t} else {\n\t\tspin_lock(\u0026rq2-\u003elock);\n\t\tspin_lock(\u0026rq1-\u003elock);\n\t}\n\nOn the other hand, the code in wake_sleeping_dependent uses the cpu id\norder to grab locks:\n\n\tfor_each_cpu_mask(i, sibling_map)\n\t\tspin_lock(\u0026cpu_rq(i)-\u003elock);\n\nThis means we rely on the address of per cpu data increasing as cpu ids\nincrease.  While this will be true for the generic percpu implementation it\nmay not be true for arch specific implementations.\n\nOne way to solve this is to always take runqueues in cpu id order. To do\nthis we add a cpu variable to the runqueue and check it in the\ndouble runqueue locking functions.\n\nSigned-off-by: Anton Blanchard \u003canton@samba.org\u003e\nAcked-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6b6e0d70eb3051ff5130e9ee1fcb4c815a2785aa",
      "old_mode": 33188,
      "old_path": "kernel/sched.c",
      "new_id": "a5bd60453eae0559fb0aa423c24ad745a3d4cf45",
      "new_mode": 33188,
      "new_path": "kernel/sched.c"
    }
  ]
}
