Skip to content

Commit

Permalink
signal/sh: Remove tsk parameter from force_sig_info_fault
Browse files Browse the repository at this point in the history
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" <[email protected]>
  • Loading branch information
ebiederm committed May 29, 2019
1 parent 9d63175 commit e165682
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions arch/sh/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down Expand Up @@ -244,16 +243,14 @@ 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)) {
/*
* It's possible to have interrupts off here:
*/
local_irq_enable();

force_sig_info_fault(SIGSEGV, si_code, address, tsk);
force_sig_info_fault(SIGSEGV, si_code, address);

return;
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e165682

Please sign in to comment.