Commit:     0840a90d943bcde2fbfeabd3c256236eed2273cd
Parent:     2b47c3611de05c585e2d81204f6c7e3e255a3461
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:27:22 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:53 2007 -0700

    exec: simplify ->sighand switching
    There is no any reason to do recalc_sigpending() after changing ->sighand.
    To begin with, recalc_sigpending() does not take ->sighand into account.
    This means we don't need to take newsighand->siglock while changing 
    rcu_assign_pointer() provides a necessary barrier, and if another process
    reads the new ->sighand it should either take tasklist_lock or it should use
    lock_task_sighand() which has a corresponding smp_read_barrier_depends().
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Roland McGrath <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/exec.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 59c0038..7f325df 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -916,12 +916,7 @@ no_thread_group:
-               spin_lock_nested(&newsighand->siglock, SINGLE_DEPTH_NESTING);
                rcu_assign_pointer(tsk->sighand, newsighand);
-               recalc_sigpending();
-               spin_unlock(&newsighand->siglock);
@@ -931,12 +926,11 @@ no_thread_group:
        return 0;
  * These functions flushes out all traces of the currently running executable
  * so that a new one can be started
 static void flush_old_files(struct files_struct * files)
        long j = -1;
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

Reply via email to