)]}'
{
  "commit": "5ae8aabeaec3fe69c4fb21cbe5b17b72b35b5892",
  "tree": "5cd5d476049486e228d60e59de46811f4161f1dd",
  "parents": [
    "6d0abeca3242a88cab8232e4acd7e2bf088f3bc2"
  ],
  "author": {
    "name": "Stephen Boyd",
    "email": "sboyd@codeaurora.org",
    "time": "Mon Feb 17 10:45:36 2014 -0800"
  },
  "committer": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Wed Feb 19 17:07:22 2014 +0100"
  },
  "message": "sched_clock: Prevent callers from seeing half-updated data\n\nThe generic sched_clock registration function was previously\ndone lockless, due to the fact that it was expected to be called\nonly once. However, now there are systems that may register\nmultiple sched_clock sources, for which the lack of locking has\ncasued problems:\n\nIf two sched_clock sources are registered we may end up in a\nsituation where a call to sched_clock() may be accessing the\nepoch cycle count for the old counter and the cycle count for the\nnew counter. This can lead to confusing results where\nsched_clock() values jump and then are reset to 0 (due to the way\nthe registration function forces the epoch_ns to be 0).\n\nFix this by reorganizing the registration function to hold the\nseqlock for as short a time as possible while we update the\nclock_data structure for a new counter. We also put any\naccumulated time into epoch_ns instead of resetting the time to\n0 so that the clock doesn\u0027t reset after each successful\nregistration.\n\n[jstultz: Added extra context to the commit message]\n\nReported-by: Will Deacon \u003cwill.deacon@arm.com\u003e\nSigned-off-by: Stephen Boyd \u003csboyd@codeaurora.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Ingo Molnar \u003cmingo@kernel.org\u003e\nCc: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Josh Cartwright \u003cjoshc@codeaurora.org\u003e\nLink: http://lkml.kernel.org/r/1392662736-7803-2-git-send-email-john.stultz@linaro.org\nSigned-off-by: John Stultz \u003cjohn.stultz@linaro.org\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0abb364642818e4ef842ab2f3631d15cb80400f2",
      "old_mode": 33188,
      "old_path": "kernel/time/sched_clock.c",
      "new_id": "4d23dc4d8139988e13946ee48d37a76333c916c0",
      "new_mode": 33188,
      "new_path": "kernel/time/sched_clock.c"
    }
  ]
}
