* [merged] signals-disallow_signal-should-flush-the-potentially-pending-signal.patch removed from -mm tree
@ 2014-06-09 19:34 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2014-06-09 19:34 UTC (permalink / raw)
To: mm-commits, viro, tj, rostedt, richard, peterz, mingo,
mathieu.desnoyers, geert, fweisbec, dwmw2, oleg
Subject: [merged] signals-disallow_signal-should-flush-the-potentially-pending-signal.patch removed from -mm tree
To: oleg@redhat.com,dwmw2@infradead.org,fweisbec@gmail.com,geert@linux-m68k.org,mathieu.desnoyers@efficios.com,mingo@kernel.org,peterz@infradead.org,richard@nod.at,rostedt@goodmis.org,tj@kernel.org,viro@ZenIV.linux.org.uk,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date: Mon, 09 Jun 2014 12:34:17 -0700
The patch titled
Subject: signals: disallow_signal() should flush the potentially pending signal
has been removed from the -mm tree. Its filename was
signals-disallow_signal-should-flush-the-potentially-pending-signal.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Oleg Nesterov <oleg@redhat.com>
Subject: signals: disallow_signal() should flush the potentially pending signal
disallow_signal() simply sets SIG_IGN, this is not enough and
recalc_sigpending() is simply pointless because in can never change the
state of TIF_SIGPENDING.
If we ignore a signal, we also need to do flush_sigqueue_mask() for the
case when this signal is pending, this way recalc_sigpending() can
actually clear TIF_SIGPENDING and we do not "leak" the allocated
siginfo's.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/signal.c | 7 +++++++
1 file changed, 7 insertions(+)
diff -puN kernel/signal.c~signals-disallow_signal-should-flush-the-potentially-pending-signal kernel/signal.c
--- a/kernel/signal.c~signals-disallow_signal-should-flush-the-potentially-pending-signal
+++ a/kernel/signal.c
@@ -3085,8 +3085,15 @@ EXPORT_SYMBOL(allow_signal);
void disallow_signal(int sig)
{
+ sigset_t mask;
+
+ sigemptyset(&mask);
+ sigaddset(&mask, sig);
+
spin_lock_irq(¤t->sighand->siglock);
current->sighand->action[(sig)-1].sa.sa_handler = SIG_IGN;
+ flush_sigqueue_mask(&mask, ¤t->signal->shared_pending);
+ flush_sigqueue_mask(&mask, ¤t->pending);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
}
_
Patches currently in -mm which might be from oleg@redhat.com are
origin.patch
cpu-hotplug-smp-flush-any-pending-ipi-callbacks-before-cpu-offline.patch
linux-next.patch
kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection.patch
kernel-watchdogc-print-traces-for-all-cpus-on-lockup-detection-fix.patch
nmi-provide-the-option-to-issue-an-nmi-back-trace-to-every-cpu-but-current.patch
nmi-provide-the-option-to-issue-an-nmi-back-trace-to-every-cpu-but-current-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-09 19:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 19:34 [merged] signals-disallow_signal-should-flush-the-potentially-pending-signal.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.