From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] sigfix-2.5.40-A0
Date: Wed, 2 Oct 2002 11:31:36 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0210021129290.6714-100000@localhost.localdomain> (raw)
the attached patch (against BK-curr) fixes yet another thread signal
detail, reported by Axel Zeuner (and also reproduced in Ulrich's thread
signal testcases) - sigwaiting threads do count as if they had those
signals unblocked. Fortunately fixing this means the removal of the
real_blocked field from task_struct.
Ingo
--- linux/include/linux/sched.h.orig Wed Oct 2 11:22:32 2002
+++ linux/include/linux/sched.h Wed Oct 2 11:23:28 2002
@@ -378,7 +378,7 @@
/* signal handlers */
struct signal_struct *sig;
- sigset_t blocked, real_blocked, shared_unblocked;
+ sigset_t blocked, shared_unblocked;
struct sigpending pending;
unsigned long sas_ss_sp;
--- linux/kernel/signal.c.orig Wed Oct 2 11:22:16 2002
+++ linux/kernel/signal.c Wed Oct 2 11:23:22 2002
@@ -843,8 +843,7 @@
struct pid *pid;
for_each_task_pid(p->tgid, PIDTYPE_TGID, tmp, l, pid)
- if (!sigismember(&tmp->blocked, signr) &&
- !sigismember(&tmp->real_blocked, signr))
+ if (!sigismember(&tmp->blocked, signr))
return tmp;
return NULL;
}
@@ -1482,7 +1481,8 @@
/* None ready -- temporarily unblock those we're
* interested while we are sleeping in so that we'll
* be awakened when they arrive. */
- current->real_blocked = current->blocked;
+ sigset_t orig_blocked = current->blocked;
+
sigandsets(¤t->blocked, ¤t->blocked, &these);
recalc_sigpending();
spin_unlock_irq(¤t->sig->siglock);
@@ -1494,8 +1494,7 @@
sig = dequeue_signal(¤t->sig->shared_pending, &these, &info);
if (!sig)
sig = dequeue_signal(¤t->pending, &these, &info);
- current->blocked = current->real_blocked;
- siginitset(¤t->real_blocked, 0);
+ current->blocked = orig_blocked;
recalc_sigpending();
}
}
next reply other threads:[~2002-10-02 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 9:31 Ingo Molnar [this message]
2002-10-02 23:18 [patch] sigfix-2.5.40-A0 Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0210021129290.6714-100000@localhost.localdomain \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).