summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-02-25 18:25:10 +0100
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-02-25 18:25:10 +0100
commit3ae08d07e7ab7f82716f5363877995b509afa361 (patch)
tree7aed0273b37c61ab8aed3271a1854daa8e5c498e
parent7d866cde0f46895a4952984c594619bfd2bd430c (diff)
downloadlinux-linaro-tracking-with-fixes-topic-fix-compat_sys_sigsuspend.tar.gz
arm64: Fix compat_sys_sigsuspendtopic-fix-compat_sys_sigsuspend
The original (bad) version changed the signal mask in the "current" process, and then passed unitialized (and likely zeroed, because of previous state -- but it usually contains some unknown value) to the function sigsuspend (kernel/signal.c), which in turn, besides the other work, sets the current->blocked. Ah, "current" is pointer to "current process" structure in the kernel. So, the good value of mask, passed from mksh, was effectively overwritten by some random value. If it is zero, all signals were blocked and pipes could not work. Author: Dmitry Pervushin <dmitry.pervushin@linaro.org> Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--arch/arm64/kernel/signal32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index a4db3d22aac..0bc94616869 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -347,7 +347,7 @@ asmlinkage int compat_sys_sigsuspend(int restart, compat_ulong_t oldmask,
{
sigset_t blocked;
- siginitset(&current->blocked, mask);
+ siginitset(&blocked, mask);
return sigsuspend(&blocked);
}