)]}'
{
  "commit": "f2d28a2ebcb525a6ec7e2152106ddb385ef52b73",
  "tree": "207920700ba3c7c7091d547184c883e7bd05a2a8",
  "parents": [
    "47239561e39bceefecc3cd67f71fcf86a198a8ff"
  ],
  "author": {
    "name": "Guillaume Knispel",
    "email": "gknispel@proformatique.com",
    "time": "Tue Mar 17 16:18:42 2009 +0100"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Tue Mar 17 16:25:28 2009 +0100"
  },
  "message": "printk: correct the behavior of printk_timed_ratelimit()\n\nImpact: fix jiffies-comparison sign-wrap behavior\n\nThe behavior provided by printk_timed_ratelimit() is, in some\nsituations, probably not what a caller would reasonably expect:\n\nbool printk_timed_ratelimit(unsigned long *caller_jiffies,\n\t\t\tunsigned int interval_msecs)\n{\n\tif (*caller_jiffies \u003d\u003d 0 || time_after(jiffies, *caller_jiffies)) {\n\t\t*caller_jiffies \u003d jiffies + msecs_to_jiffies(interval_msecs);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nOn a 32 bit computer, if printk_timed_ratelimit() is initially called at\ntime jiffies \u003d\u003d Ja, *caller_jiffies is set to\nJa + msecs_to_jiffies(interval_msecs): let\u0027s say Ja + 42 for this\nexample.\n\nIf this caller then doesn\u0027t call printk_timed_ratelimit() until\njiffies \u003d\u003d Ja + (1 \u003c\u003c 31) + 42 (which can happen as soon as ~ 25 days\nlater on a 1000 HZ system), printk_timed_ratelimit() will then always\nreturn false to this caller until jiffies loops completely (1 \u003c\u003c 31 more\nticks).\n\nThs change makes it only return false if jiffies is in the small\ntime window starting at the previous call when true was returned and\nending interval_msecs later.  Note that if jiffies loops completely\nbetween two calls to printk_timed_ratelimit(), it will obviously still\nwrongly return false, but this is something with a low probability.\n\nIf something completely reliable is needed I guess jiffies_64 must be\nused (which this change does not do).\n\nSigned-off-by: Guillaume Knispel \u003cgknispel@proformatique.com\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Rusty Russell \u003crusty@rustcorp.com.au\u003e\nCc: Andrew Morton \u003cakpm@osdl.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nLKML-Reference: \u003c20090317161842.0059096b@xilun.lan.proformatique.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e3602d0755b0dd99c9fb47887fd67d371cdd5424",
      "old_mode": 33188,
      "old_path": "kernel/printk.c",
      "new_id": "2be719908d1f53a5ae99636ab2d70ebaa4b64405",
      "new_mode": 33188,
      "new_path": "kernel/printk.c"
    }
  ]
}
