diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-23 12:04:24 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-29 10:31:43 -0400 |
commit | 2e1661d2673667d886cd40ad9f414cb6db48d8da (patch) | |
tree | 5a2c32eb8a5c575bfb5c7013f5d9d427f5c06c34 /arch/um/kernel/trap.c | |
parent | 91ca180dbdd687d45fe4aab055b02d29c91b90df (diff) |
signal: Remove the task parameter from force_sig_fault
As synchronous exceptions really only make sense against the current
task (otherwise how are you synchronous) remove the task parameter
from from force_sig_fault to make it explicit that is what is going
on.
The two known exceptions that deliver a synchronous exception to a
stopped ptraced task have already been changed to
force_sig_fault_to_task.
The callers have been changed with the following emacs regular expression
(with obvious variations on the architectures that take more arguments)
to avoid typos:
force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)]
->
force_sig_fault(\1,\2,\3)
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/um/kernel/trap.c')
-rw-r--r-- | arch/um/kernel/trap.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index 1c943c66063f..58fe36856182 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -163,8 +163,7 @@ static void show_segv_info(struct uml_pt_regs *regs) | |||
163 | static void bad_segv(struct faultinfo fi, unsigned long ip) | 163 | static void bad_segv(struct faultinfo fi, unsigned long ip) |
164 | { | 164 | { |
165 | current->thread.arch.faultinfo = fi; | 165 | current->thread.arch.faultinfo = fi; |
166 | force_sig_fault(SIGSEGV, SEGV_ACCERR, (void __user *) FAULT_ADDRESS(fi), | 166 | force_sig_fault(SIGSEGV, SEGV_ACCERR, (void __user *) FAULT_ADDRESS(fi)); |
167 | current); | ||
168 | } | 167 | } |
169 | 168 | ||
170 | void fatal_sigsegv(void) | 169 | void fatal_sigsegv(void) |
@@ -268,13 +267,11 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, | |||
268 | 267 | ||
269 | if (err == -EACCES) { | 268 | if (err == -EACCES) { |
270 | current->thread.arch.faultinfo = fi; | 269 | current->thread.arch.faultinfo = fi; |
271 | force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, | 270 | force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address); |
272 | current); | ||
273 | } else { | 271 | } else { |
274 | BUG_ON(err != -EFAULT); | 272 | BUG_ON(err != -EFAULT); |
275 | current->thread.arch.faultinfo = fi; | 273 | current->thread.arch.faultinfo = fi; |
276 | force_sig_fault(SIGSEGV, si_code, (void __user *) address, | 274 | force_sig_fault(SIGSEGV, si_code, (void __user *) address); |
277 | current); | ||
278 | } | 275 | } |
279 | 276 | ||
280 | out: | 277 | out: |
@@ -304,8 +301,7 @@ void relay_signal(int sig, struct siginfo *si, struct uml_pt_regs *regs) | |||
304 | if ((err == 0) && (siginfo_layout(sig, code) == SIL_FAULT)) { | 301 | if ((err == 0) && (siginfo_layout(sig, code) == SIL_FAULT)) { |
305 | struct faultinfo *fi = UPT_FAULTINFO(regs); | 302 | struct faultinfo *fi = UPT_FAULTINFO(regs); |
306 | current->thread.arch.faultinfo = *fi; | 303 | current->thread.arch.faultinfo = *fi; |
307 | force_sig_fault(sig, code, (void __user *)FAULT_ADDRESS(*fi), | 304 | force_sig_fault(sig, code, (void __user *)FAULT_ADDRESS(*fi)); |
308 | current); | ||
309 | } else { | 305 | } else { |
310 | printk(KERN_ERR "Attempted to relay unknown signal %d (si_code = %d) with errno %d\n", | 306 | printk(KERN_ERR "Attempted to relay unknown signal %d (si_code = %d) with errno %d\n", |
311 | sig, code, err); | 307 | sig, code, err); |