* [patch] sigfix-2.5.40-A0
@ 2002-10-02 9:31 Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2002-10-02 9:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
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();
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] sigfix-2.5.40-A0
@ 2002-10-02 23:18 Oleg Nesterov
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Nesterov @ 2002-10-02 23:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar
Hello.
Ingo Molnar wrote:
> Fortunately fixing this means the removal of the
> real_blocked field from task_struct.
And what about shared_unblocked field ?
Nobody use it.
Oleg.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-02 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02 9:31 [patch] sigfix-2.5.40-A0 Ingo Molnar
2002-10-02 23:18 Oleg Nesterov
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).