[3.8.y.z extended stable] Patch "xtensa: don't use alternate signal stack on threads" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Fri Nov 8 02:08:19 UTC 2013
This is a note to let you know that I have just added a patch titled
xtensa: don't use alternate signal stack on threads
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.13.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 8201fd95dc667118d37aa9ccf3ec8e5a788eebb4 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch at tkos.co.il>
Date: Tue, 15 Oct 2013 02:22:43 +0400
Subject: xtensa: don't use alternate signal stack on threads
commit cba9a90053e3b7973eff4f1946f33032e98eeed5 upstream.
According to create_thread(3): "The new thread does not inherit the creating
thread's alternate signal stack". Since commit f9a3879a (Fix sigaltstack
corruption among cloned threads), current->sas_ss_size is set to 0 for cloned
processes sharing VM with their parent. Don't use the (nonexistent) alternate
signal stack in this case. This has been broken since commit 29c4dfd9 ([XTENSA]
Remove non-rt signal handling).
Fixes the SA_ONSTACK part of the nptl/tst-cancel20 test from uClibc.
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
Signed-off-by: Chris Zankel <chris at zankel.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
arch/xtensa/kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index de34d6b..3f4b160 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -341,7 +341,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sp = regs->areg[1];
- if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) {
+ if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && sas_ss_flags(sp) == 0) {
sp = current->sas_ss_sp + current->sas_ss_size;
}
--
1.8.1.2
More information about the kernel-team
mailing list