Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=caec4e8dc85e0644ec24aeb36285e1ba02da58cc
Commit:     caec4e8dc85e0644ec24aeb36285e1ba02da58cc
Parent:     bd197234b0a616c8f04f6b682326a5a24b33ca92
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Tue Jun 12 08:16:18 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jun 18 10:18:32 2007 -0700

    Fix signalfd interaction with thread-private signals
    
    Don't let signalfd dequeue private signals off other threads (in the
    case of things like SIGILL or SIGSEGV, trying to do so would result
    in undefined behaviour on who actually gets the signal, since they
    are force unblocked).
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Acked-by: Davide Libenzi <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/signal.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index fe590e0..f940560 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -363,7 +363,13 @@ static int __dequeue_signal(struct sigpending *pending, 
sigset_t *mask,
  */
 int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
 {
-       int signr = __dequeue_signal(&tsk->pending, mask, info);
+       int signr = 0;
+
+       /* We only dequeue private signals from ourselves, we don't let
+        * signalfd steal them
+        */
+       if (tsk == current)
+               signr = __dequeue_signal(&tsk->pending, mask, info);
        if (!signr) {
                signr = __dequeue_signal(&tsk->signal->shared_pending,
                                         mask, info);
-
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