[REVIEW,13/26] signal/sh: Remove tsk parameter from force_sig_info_fault

Submitted by Eric W. Biederman on May 23, 2019, 12:39 a.m.

Details

Message ID 20190523003916.20726-14-ebiederm@xmission.com
State New
Series "signal: Remove task argument from force_sig_info"
Headers show

Commit Message

Eric W. Biederman May 23, 2019, 12:39 a.m.
The force_sig_info_fault function is always called with tsk == current.
Make that explicit by removing the tsk parameter.

This also makes it clear that the sh force_sig_info_fault passes
current into force_sig_fault.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 arch/sh/mm/fault.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 6defd2c6d9b1..851a3cbb2b9c 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -39,10 +39,9 @@  static inline int notify_page_fault(struct pt_regs *regs, int trap)
 }
 
 static void
-force_sig_info_fault(int si_signo, int si_code, unsigned long address,
-		     struct task_struct *tsk)
+force_sig_info_fault(int si_signo, int si_code, unsigned long address)
 {
-	force_sig_fault(si_signo, si_code, (void __user *)address, tsk);
+	force_sig_fault(si_signo, si_code, (void __user *)address, current);
 }
 
 /*
@@ -244,8 +243,6 @@  static void
 __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 		       unsigned long address, int si_code)
 {
-	struct task_struct *tsk = current;
-
 	/* User mode accesses just cause a SIGSEGV */
 	if (user_mode(regs)) {
 		/*
@@ -253,7 +250,7 @@  __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 		 */
 		local_irq_enable();
 
-		force_sig_info_fault(SIGSEGV, si_code, address, tsk);
+		force_sig_info_fault(SIGSEGV, si_code, address);
 
 		return;
 	}
@@ -308,7 +305,7 @@  do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address)
 	if (!user_mode(regs))
 		no_context(regs, error_code, address);
 
-	force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk);
+	force_sig_info_fault(SIGBUS, BUS_ADRERR, address);
 }
 
 static noinline int