]> git.baikalelectronics.ru Git - kernel.git/commit
Assign task_struct.exit_code before taskstats_exit()
authorJonathan Lim <jlim@sgi.com>
Fri, 31 Aug 2007 06:56:23 +0000 (23:56 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 31 Aug 2007 08:42:22 +0000 (01:42 -0700)
commit3ca47d7a485c2e13f373becbdee6d65288424ab1
treeab7de371c86ce9e72015363fc06563709d823354
parent88aabe54c421e9e4e870a26c0473f6d4c1547f27
Assign task_struct.exit_code before taskstats_exit()

taskstats.ac_exitcode is assigned to task_struct.exit_code in bacct_add_tsk()
through the following kernel function calls:

  do_exit()
    taskstats_exit()
      fill_pid()
        bacct_add_tsk()

The problem is that in do_exit(), task_struct.exit_code is set to 'code' only
after taskstats_exit() has been called.  So we need to move the assignment
before taskstats_exit().

Signed-off-by: Jonathan Lim <jlim@sgi.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/exit.c