)]}'
{
  "commit": "0e04388f0189fa1f6812a8e1cb6172136eada87e",
  "tree": "4e0bf422e8ed6b61b840ac45dadaca84b954f7ad",
  "parents": [
    "4b119e21d0c66c22e8ca03df05d9de623d0eb50f"
  ],
  "author": {
    "name": "Li Zefan",
    "email": "lizf@cn.fujitsu.com",
    "time": "Thu Apr 17 11:37:15 2008 +0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Apr 18 08:17:57 2008 -0700"
  },
  "message": "cgroup: fix a race condition in manipulating tsk-\u003ecg_list\n\nWhen I ran a test program to fork mass processes and at the same time\n\u0027cat /cgroup/tasks\u0027, I got the following oops:\n\n  ------------[ cut here ]------------\n  kernel BUG at lib/list_debug.c:72!\n  invalid opcode: 0000 [#1] SMP\n  Pid: 4178, comm: a.out Not tainted (2.6.25-rc9 #72)\n  ...\n  Call Trace:\n   [\u003cc044a5f9\u003e] ? cgroup_exit+0x55/0x94\n   [\u003cc0427acf\u003e] ? do_exit+0x217/0x5ba\n   [\u003cc0427ed7\u003e] ? do_group_exit+0.65/0x7c\n   [\u003cc0427efd\u003e] ? sys_exit_group+0xf/0x11\n   [\u003cc0404842\u003e] ? syscall_call+0x7/0xb\n   [\u003cc05e0000\u003e] ? init_cyrix+0x2fa/0x479\n  ...\n  EIP: [\u003cc04df671\u003e] list_del+0x35/0x53 SS:ESP 0068:ebc7df4\n  ---[ end trace caffb7332252612b ]---\n  Fixing recursive fault but reboot is needed!\n\nAfter digging into the code and debugging, I finlly found out a race\nsituation:\n\n\t\t\t\tdo_exit()\n\t\t\t\t  -\u003ecgroup_exit()\n\t\t\t\t    -\u003eif (!list_empty(\u0026tsk-\u003ecg_list))\n\t\t\t\t        list_del(\u0026tsk-\u003ecg_list);\n\n  cgroup_iter_start()\n    -\u003ecgroup_enable_task_cg_list()\n      -\u003elist_add(\u0026tsk-\u003ecg_list, ..);\n\nIn this case the list won\u0027t be deleted though the process has exited.\n\nWe got two bug reports in the past, which seem to be the same bug as\nthis one:\n\thttp://lkml.org/lkml/2008/3/5/332\n\thttp://lkml.org/lkml/2007/10/17/224\n\nActually sometimes I got oops on list_del, sometimes oops on list_add.\nAnd I can change my test program a bit to trigger other oops.\n\nThe patch has been tested both on x86_32 and x86_64.\n\nSigned-off-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nAcked-by: Paul Menage \u003cmenage@google.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: stable@kernel.org\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2727f92383596e4a6f7bec5072b1e804a7801916",
      "old_mode": 33188,
      "old_path": "kernel/cgroup.c",
      "new_id": "6d8de051382b0687ab1a449c245ebb2f05cd38f0",
      "new_mode": 33188,
      "new_path": "kernel/cgroup.c"
    }
  ]
}
