summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ptrace.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2019-02-05 18:25:11 -0600
committerEric W. Biederman <ebiederm@xmission.com>2019-05-29 09:30:48 -0500
commit28d42ea14e489047caeaa89496a3ad7e0ae6a49f (patch)
tree895bd73d7e510332abd37978ffba288a0ebd202d /arch/x86/kernel/ptrace.c
parentf8eac9011b6be56acfb5d1d0dfd5ee30082a12ee (diff)
downloadlinux-28d42ea14e489047caeaa89496a3ad7e0ae6a49f.tar.bz2
signal/x86: Remove task parameter from send_sigtrap
The send_sigtrap function is always called with task == current. Make that explicit by removing the task parameter. This also makes it clear that the x86 send_sigtrap passes current into force_sig_fault. Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r--arch/x86/kernel/ptrace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 4b8ee05dd6ad..00148141f138 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1360,9 +1360,10 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
#endif
}
-void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
- int error_code, int si_code)
+void send_sigtrap(struct pt_regs *regs, int error_code, int si_code)
{
+ struct task_struct *tsk = current;
+
tsk->thread.trap_nr = X86_TRAP_DB;
tsk->thread.error_code = error_code;
@@ -1373,5 +1374,5 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
void user_single_step_report(struct pt_regs *regs)
{
- send_sigtrap(current, regs, 0, TRAP_BRKPT);
+ send_sigtrap(regs, 0, TRAP_BRKPT);
}