)]}'
{
  "commit": "50fb4f7fc907efff65eadb0b74387a9ffed6e849",
  "tree": "e3392afa49a97c187d7e63f3fee862aef9e342ed",
  "parents": [
    "6fe4c6d466e95d31164f14b1ac4aefb51f0f4f82"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Mon Nov 21 12:32:22 2011 -0800"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Mon Nov 21 12:32:22 2011 -0800"
  },
  "message": "freezer: fix current-\u003estate restoration race in refrigerator()\n\nrefrigerator() saves current-\u003estate before entering frozen state and\nrestores it before returning using __set_current_state(); however,\nthis is racy, for example, please consider the following sequence.\n\n\tset_current_state(TASK_INTERRUPTIBLE);\n\ttry_to_freeze();\n\tif (kthread_should_stop())\n\t\tbreak;\n\tschedule();\n\nIf kthread_stop() races with -\u003estate restoration, the restoration can\nrestore -\u003estate to TASK_INTERRUPTIBLE after kthread_stop() sets it to\nTASK_RUNNING but kthread_should_stop() may still see zero\n-\u003eshould_stop because there\u0027s no memory barrier between restoring\nTASK_INTERRUPTIBLE and kthread_should_stop() test.\n\nThis isn\u0027t restricted to kthread_should_stop().  current-\u003estate is\noften used in memory barrier based synchronization and silently\nrestoring it w/o mb breaks them.\n\nUse set_current_state() instead.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7be56c53439723bb1f95ff43b6cb620ef1524193",
      "old_mode": 33188,
      "old_path": "kernel/freezer.c",
      "new_id": "3f460104a9d6064d0db167f03092c9e1819ce81a",
      "new_mode": 33188,
      "new_path": "kernel/freezer.c"
    }
  ]
}
