)]}'
{
  "commit": "a69ac4a78d8bd9e1ec478bd7297d4f047fcd44a8",
  "tree": "a56edf4f69cc01c6d4b7b3eeee3646c7ea9810df",
  "parents": [
    "ca531a0a5e01e5122f67cb6aca8fcbfc70e18e0b"
  ],
  "author": {
    "name": "Oleg Nesterov",
    "email": "oleg@tv-sign.ru",
    "time": "Mon Oct 24 18:29:58 2005 +0400"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Mon Oct 24 08:13:14 2005 -0700"
  },
  "message": "[PATCH] posix-timers: fix posix_cpu_timer_set() vs run_posix_cpu_timers() race\n\nThis might be harmless, but looks like a race from code inspection (I\nwas unable to trigger it).  I must admit, I don\u0027t understand why we\ncan\u0027t return TIMER_RETRY after \u0027spin_unlock(\u0026p-\u003esighand-\u003esiglock)\u0027\nwithout doing bump_cpu_timer(), but this is what original code does.\n\nposix_cpu_timer_set:\n\n\tread_lock(\u0026tasklist_lock);\n\n\tspin_lock(\u0026p-\u003esighand-\u003esiglock);\n\tlist_del_init(\u0026timer-\u003eit.cpu.entry);\n\tspin_unlock(\u0026p-\u003esighand-\u003esiglock);\n\nWe are probaly deleting the timer from run_posix_cpu_timers\u0027s \u0027firing\u0027\nlocal list_head while run_posix_cpu_timers() does list_for_each_safe.\n\nVarious bad things can happen, for example we can just delete this timer\nso that list_for_each() will not notice it and run_posix_cpu_timers()\nwill not reset \u0027-\u003efiring\u0027 flag. In that case,\n\n\t....\n\n\tif (timer-\u003eit.cpu.firing) {\n\t\tread_unlock(\u0026tasklist_lock);\n\t\ttimer-\u003eit.cpu.firing \u003d -1;\n\t\treturn TIMER_RETRY;\n\t}\n\nsys_timer_settime() goes to \u0027retry:\u0027, calls posix_cpu_timer_set() again,\nit returns TIMER_RETRY ...\n\nSigned-off-by: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "92a038064628feebcbf167e65bae85767fffb5a7",
      "old_mode": 33188,
      "old_path": "kernel/posix-cpu-timers.c",
      "new_id": "b15462b17a5827f6eb22cdf2e39481bb2c4e55cc",
      "new_mode": 33188,
      "new_path": "kernel/posix-cpu-timers.c"
    }
  ]
}
