diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2019-02-07 11:05:12 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-29 10:31:43 -0400 |
commit | ec74e9205e064af6a7076faabe649335acc78b69 (patch) | |
tree | e04e01e867715a9641176adb0d0be1c09780b5ef | |
parent | fd65cc848e3f50281eb163e2d54f1e33f28e15bf (diff) |
signal/unicore32: Remove tsk parameter from __do_user_fault
The __do_user_fault function is always called with tsk == current.
Make that obvious by removing the tsk parameter.
This makes it clear that __do_user_fault calls force_sig_fault
on the current task.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-rw-r--r-- | arch/unicore32/mm/fault.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index b9a3a50644c1..cadee0b3b4e0 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/unicore32/mm/fault.c | |||
@@ -116,10 +116,11 @@ static void __do_kernel_fault(struct mm_struct *mm, unsigned long addr, | |||
116 | * Something tried to access memory that isn't in our memory map.. | 116 | * Something tried to access memory that isn't in our memory map.. |
117 | * User mode accesses just cause a SIGSEGV | 117 | * User mode accesses just cause a SIGSEGV |
118 | */ | 118 | */ |
119 | static void __do_user_fault(struct task_struct *tsk, unsigned long addr, | 119 | static void __do_user_fault(unsigned long addr, unsigned int fsr, |
120 | unsigned int fsr, unsigned int sig, int code, | 120 | unsigned int sig, int code, struct pt_regs *regs) |
121 | struct pt_regs *regs) | ||
122 | { | 121 | { |
122 | struct task_struct *tsk = current; | ||
123 | |||
123 | tsk->thread.address = addr; | 124 | tsk->thread.address = addr; |
124 | tsk->thread.error_code = fsr; | 125 | tsk->thread.error_code = fsr; |
125 | tsk->thread.trap_no = 14; | 126 | tsk->thread.trap_no = 14; |
@@ -136,7 +137,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
136 | * have no context to handle this fault with. | 137 | * have no context to handle this fault with. |
137 | */ | 138 | */ |
138 | if (user_mode(regs)) | 139 | if (user_mode(regs)) |
139 | __do_user_fault(tsk, addr, fsr, SIGSEGV, SEGV_MAPERR, regs); | 140 | __do_user_fault(addr, fsr, SIGSEGV, SEGV_MAPERR, regs); |
140 | else | 141 | else |
141 | __do_kernel_fault(mm, addr, fsr, regs); | 142 | __do_kernel_fault(mm, addr, fsr, regs); |
142 | } | 143 | } |
@@ -310,7 +311,7 @@ retry: | |||
310 | code = fault == VM_FAULT_BADACCESS ? SEGV_ACCERR : SEGV_MAPERR; | 311 | code = fault == VM_FAULT_BADACCESS ? SEGV_ACCERR : SEGV_MAPERR; |
311 | } | 312 | } |
312 | 313 | ||
313 | __do_user_fault(tsk, addr, fsr, sig, code, regs); | 314 | __do_user_fault(addr, fsr, sig, code, regs); |
314 | return 0; | 315 | return 0; |
315 | 316 | ||
316 | no_context: | 317 | no_context: |