Commit 615869e40bc0f84bc73d43e83ab88a7d4b66759f
Committed by
Richard Weinberger
1 parent
e90670a962
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
c6x: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Mark Salter <msalter@redhat.com>
Showing 1 changed file with 3 additions and 9 deletions Side-by-side Diff
arch/c6x/kernel/signal.c
... | ... | @@ -127,19 +127,13 @@ |
127 | 127 | return err; |
128 | 128 | } |
129 | 129 | |
130 | -static inline void __user *get_sigframe(struct k_sigaction *ka, | |
130 | +static inline void __user *get_sigframe(struct ksignal *ksig, | |
131 | 131 | struct pt_regs *regs, |
132 | 132 | unsigned long framesize) |
133 | 133 | { |
134 | - unsigned long sp = regs->sp; | |
134 | + unsigned long sp = sigsp(regs->sp, ksig); | |
135 | 135 | |
136 | 136 | /* |
137 | - * This is the X/Open sanctioned signal stack switching. | |
138 | - */ | |
139 | - if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(sp) == 0) | |
140 | - sp = current->sas_ss_sp + current->sas_ss_size; | |
141 | - | |
142 | - /* | |
143 | 137 | * No matter what happens, 'sp' must be dword |
144 | 138 | * aligned. Otherwise, nasty things will happen |
145 | 139 | */ |
... | ... | @@ -153,7 +147,7 @@ |
153 | 147 | unsigned long __user *retcode; |
154 | 148 | int err = 0; |
155 | 149 | |
156 | - frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); | |
150 | + frame = get_sigframe(ksig, regs, sizeof(*frame)); | |
157 | 151 | |
158 | 152 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
159 | 153 | return -EFAULT; |