)]}'
{
  "commit": "343f572ae08b523206381f97df36619bda749b59",
  "tree": "765ab9941255676f6106d3c8f70c2d5737e2bcd4",
  "parents": [
    "6d885d3b0ad469c48fd8e1de454455c62db9fa24"
  ],
  "author": {
    "name": "Boqun Feng",
    "email": "boqun.feng@gmail.com",
    "time": "Mon Aug 28 10:46:17 2017 +0800"
  },
  "committer": {
    "name": "Boqun Feng",
    "email": "boqun.feng@gmail.com",
    "time": "Mon Aug 28 22:10:27 2017 +0800"
  },
  "message": "lockdep: Take read/write status in consideration when generate chainkey\n\nCurrently, the chainkey of a lock chain is a hash sum of the class_idx\nof all the held locks, the read/write status are not taken in to\nconsideration while generating the chainkey. This could result into a\nproblem, if we have:\n\n\tP1()\n\t{\n\t\tread_lock(B);\n\t\tlock(A);\n\t}\n\n\tP2()\n\t{\n\t\tlock(A);\n\t\tread_lock(B);\n\t}\n\n\tP3()\n\t{\n\t\tlock(A);\n\t\twrite_lock(B);\n\t}\n\n, and P1(), P2(), P3() run one by one, when running P2(), it\u0027s detected\nsuch a lock chain A -\u003e B is not a deadlock, then it\u0027s added in the chain\ncache, and then when running P3(), even if it\u0027s a deadlock, we could\nmiss it because of the hit of chain cache. This could be confirmed by\nself testcase \"chain cached mixed R-L/L-W \".\n\nTo resolve this, we use \"hlock_id\" to generate the chainkey, the\nhlock_id is a tuple (hlock-\u003eclass_idx, hlock-\u003eread), which fits in a u16\ntype. With this, the chainkeys are different is the lock sequences have\nthe same locks but different read/write status.\n\nBesides, since we use \"hlock_id\" to generate chainkeys, the chain_hlocks\nnow store the \"hlock_id\"s rather than lock_class indexes.\n\nSigned-off-by: Boqun Feng \u003cboqun.feng@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "245324c59706aca7a2b3c3424a57e1718a05feae",
      "old_mode": 33188,
      "old_path": "kernel/locking/lockdep.c",
      "new_id": "c7c430e46b4b61b0c310664224e08c75f408729f",
      "new_mode": 33188,
      "new_path": "kernel/locking/lockdep.c"
    }
  ]
}
