)]}'
{
  "commit": "a0c4acd2c220376b4e9690e75782d0c0afdaab9f",
  "tree": "e9a18f3565fa002ddc6b23a86a10f92eb8d86d81",
  "parents": [
    "4422d80ed7d4bdb2d6e9fb890c66c3d9250ba694"
  ],
  "author": {
    "name": "Kirill Tkhai",
    "email": "ktkhai@virtuozzo.com",
    "time": "Fri Jun 16 16:44:34 2017 +0300"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@kernel.org",
    "time": "Wed Jul 05 12:26:29 2017 +0200"
  },
  "message": "locking/rwsem-spinlock: Fix EINTR branch in __down_write_common()\n\nIf a writer could been woken up, the above branch\n\n\tif (sem-\u003ecount \u003d\u003d 0)\n\t\tbreak;\n\nwould have moved us to taking the sem. So, it\u0027s\nnot the time to wake a writer now, and only readers\nare allowed now. Thus, 0 must be passed to __rwsem_do_wake().\n\nNext, __rwsem_do_wake() wakes readers unconditionally.\nBut we mustn\u0027t do that if the sem is owned by writer\nin the moment. Otherwise, writer and reader own the sem\nthe same time, which leads to memory corruption in\ncallers.\n\nrwsem-xadd.c does not need that, as:\n\n  1) the similar check is made lockless there,\n  2) in __rwsem_mark_wake::try_reader_grant we test,\n\nthat sem is not owned by writer.\n\nSigned-off-by: Kirill Tkhai \u003cktkhai@virtuozzo.com\u003e\nAcked-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Niklas Cassel \u003cniklas.cassel@axis.com\u003e\nCc: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nFixes: 17fcbd590d0c \"locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK\u003dy\"\nLink: http://lkml.kernel.org/r/149762063282.19811.9129615532201147826.stgit@localhost.localdomain\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c65f7989f850d12508045896a2cb98d5b691c068",
      "old_mode": 33188,
      "old_path": "kernel/locking/rwsem-spinlock.c",
      "new_id": "20819df981256c51f94bfdc38a2635132a7c8be6",
      "new_mode": 33188,
      "new_path": "kernel/locking/rwsem-spinlock.c"
    }
  ]
}
