diff options
author | Richard Weinberger <richard@nod.at> | 2014-03-05 07:26:26 -0500 |
---|---|---|
committer | Richard Weinberger <richard@sigma-star.at> | 2014-08-06 07:03:45 -0400 |
commit | 5290dd79c0219fd2b90784d66a54d00880a21520 (patch) | |
tree | 55a3ffd12505e12986cf2f1f7856ad8587e36fc6 /arch | |
parent | 72f15c03977acc8f06080e6c8a91d93bfc655a65 (diff) |
arc: Use sigsp()
Use sigsp() instead of the open coded variant.
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/kernel/signal.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c index c2031e20c048..cb3142a2d40b 100644 --- a/arch/arc/kernel/signal.c +++ b/arch/arc/kernel/signal.c | |||
@@ -141,17 +141,13 @@ badframe: | |||
141 | /* | 141 | /* |
142 | * Determine which stack to use.. | 142 | * Determine which stack to use.. |
143 | */ | 143 | */ |
144 | static inline void __user *get_sigframe(struct k_sigaction *ka, | 144 | static inline void __user *get_sigframe(struct ksignal *ksig, |
145 | struct pt_regs *regs, | 145 | struct pt_regs *regs, |
146 | unsigned long framesize) | 146 | unsigned long framesize) |
147 | { | 147 | { |
148 | unsigned long sp = regs->sp; | 148 | unsigned long sp = sigsp(regs->sp, ksig); |
149 | void __user *frame; | 149 | void __user *frame; |
150 | 150 | ||
151 | /* This is the X/Open sanctioned signal stack switching */ | ||
152 | if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp)) | ||
153 | sp = current->sas_ss_sp + current->sas_ss_size; | ||
154 | |||
155 | /* No matter what happens, 'sp' must be word | 151 | /* No matter what happens, 'sp' must be word |
156 | * aligned otherwise nasty things could happen | 152 | * aligned otherwise nasty things could happen |
157 | */ | 153 | */ |
@@ -185,7 +181,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) | |||
185 | unsigned int magic = 0; | 181 | unsigned int magic = 0; |
186 | int err = 0; | 182 | int err = 0; |
187 | 183 | ||
188 | sf = get_sigframe(&ksig->ka, regs, sizeof(struct rt_sigframe)); | 184 | sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); |
189 | if (!sf) | 185 | if (!sf) |
190 | return 1; | 186 | return 1; |
191 | 187 | ||