Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ryan.harkin@linaro.org (Ryan Harkin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: compat_sys_sigsuspend: init local blocked mask not current process mask
Date: Mon, 25 Feb 2013 12:40:07 +0000	[thread overview]
Message-ID: <1361796007-20143-1-git-send-email-ryan.harkin@linaro.org> (raw)

The original version changed the signal mask in the current process, and then passed an unitialized variable to sigsuspend, which in turn, besides the other work, sets current->blocked.

The value of mask, passed from a process, was effectively overwritten by some random value.  If the random value was zero, all signals were blocked and pipes no longer work.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
---
 arch/arm64/kernel/signal32.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index a4db3d2..0bc9461 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);
 }
 
-- 
1.7.9.5

             reply	other threads:[~2013-02-25 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 12:40 Ryan Harkin [this message]
2013-02-25 12:58 ` [PATCH] arm64: compat_sys_sigsuspend: init local blocked mask not current process mask Catalin Marinas

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=1361796007-20143-1-git-send-email-ryan.harkin@linaro.org \
    --to=ryan.harkin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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