summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-06-15 18:02:25 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-18 16:17:42 +0100
commitcc1a852137d6c12d50c372d61a1c5f763998536b (patch)
treed7c01ac23534b98ae76af22f1a914b4a569176dc
parentce7a3fdc5c55fd01d8e2deda0daef84473644f8b (diff)
downloadlinux-cc1a852137d6c12d50c372d61a1c5f763998536b.tar.gz
linux-cc1a852137d6c12d50c372d61a1c5f763998536b.tar.bz2
linux-cc1a852137d6c12d50c372d61a1c5f763998536b.zip
[ARM] Replace extramask with a full copy of the sigmask
There's not much point in splitting the sigmask between two different locations, so copy it entirely into a proper sigset_t. This will eventually allow rt_sigframe and sigframe to share more code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/signal.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 0ddbf2795c5b..7a4213ef0f46 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -194,7 +194,7 @@ struct aux_sigframe {
*/
struct sigframe {
struct sigcontext sc;
- unsigned long extramask[_NSIG_WORDS-1];
+ sigset_t sigmask;
unsigned long retcode[2];
struct aux_sigframe aux __attribute__((aligned(8)));
};
@@ -264,10 +264,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
if (!access_ok(VERIFY_READ, frame, sizeof (*frame)))
goto badframe;
- if (__get_user(set.sig[0], &frame->sc.oldmask)
- || (_NSIG_WORDS > 1
- && __copy_from_user(&set.sig[1], &frame->extramask,
- sizeof(frame->extramask))))
+ if (__copy_from_user(&set, &frame->sigmask, sizeof(set)))
goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE);
@@ -486,11 +483,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
return 1;
err |= setup_sigcontext(&frame->sc, &frame->aux, regs, set->sig[0]);
-
- if (_NSIG_WORDS > 1) {
- err |= __copy_to_user(frame->extramask, &set->sig[1],
- sizeof(frame->extramask));
- }
+ err |= __copy_to_user(&frame->sigmask, set, sizeof(*set));
if (err == 0)
err = setup_return(regs, ka, frame->retcode, frame, usig);