Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2ab6d8889422c1f5354f014e8bef337b1d1bade
Commit:     f2ab6d8889422c1f5354f014e8bef337b1d1bade
Parent:     c24c55c75a0d799be07ad6c1a7ff4ccfe25da75b
Author:     Jonathan Lim <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

    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 <[EMAIL PROTECTED]>
    Cc: Balbir Singh <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/exit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 9578c1a..06b24b3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -975,6 +975,7 @@ fastcall NORET_TYPE void do_exit(long code)
        if (unlikely(tsk->audit_context))
                audit_free(tsk);
 
+       tsk->exit_code = code;
        taskstats_exit(tsk, group_dead);
 
        exit_mm(tsk);
@@ -996,7 +997,6 @@ fastcall NORET_TYPE void do_exit(long code)
        if (tsk->binfmt)
                module_put(tsk->binfmt->module);
 
-       tsk->exit_code = code;
        proc_exit_connector(tsk);
        exit_task_namespaces(tsk);
        exit_notify(tsk);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to