Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57372
b: refs/heads/master
c: 143a275
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 7, 2007
1 parent de9d286 commit de791ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f40e524eaec9697d1515564fd5b961d839d2dc4f
refs/heads/master: 143a275984b37058d2d3ab1ec0e5be9026fda24d
16 changes: 12 additions & 4 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ static int recalc_sigpending_tsk(struct task_struct *t)
set_tsk_thread_flag(t, TIF_SIGPENDING);
return 1;
}
clear_tsk_thread_flag(t, TIF_SIGPENDING);
/*
* We must never clear the flag in another thread, or in current
* when it's possible the current syscall is returning -ERESTART*.
* So we don't clear it here, and only callers who know they should do.
*/
return 0;
}

Expand All @@ -121,7 +125,9 @@ void recalc_sigpending_and_wake(struct task_struct *t)

void recalc_sigpending(void)
{
recalc_sigpending_tsk(current);
if (!recalc_sigpending_tsk(current))
clear_thread_flag(TIF_SIGPENDING);

}

/* Given the mask, find the first available signal that should be serviced. */
Expand Down Expand Up @@ -385,7 +391,8 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
}
}
}
recalc_sigpending_tsk(tsk);
if (likely(tsk == current))
recalc_sigpending();
if (signr && unlikely(sig_kernel_stop(signr))) {
/*
* Set a marker that we have dequeued a stop signal. Our
Expand Down Expand Up @@ -1580,8 +1587,9 @@ static void ptrace_stop(int exit_code, int nostop_code, siginfo_t *info)
/*
* Queued signals ignored us while we were stopped for tracing.
* So check for any that we should take before resuming user mode.
* This sets TIF_SIGPENDING, but never clears it.
*/
recalc_sigpending();
recalc_sigpending_tsk(current);
}

void ptrace_notify(int exit_code)
Expand Down
Empty file modified trunk/scripts/checkpatch.pl
100644 → 100755
Empty file.

0 comments on commit de791ea

Please sign in to comment.