Commit 73f297aa authored by Eric W. Biederman's avatar Eric W. Biederman

signal/x86: Inline fill_sigtrap_info in it's only caller send_sigtrap

The function fill_sigtrap_info now only has one caller so remove
it and put it's contents in it's caller.
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent efc463ad
...@@ -1369,27 +1369,19 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) ...@@ -1369,27 +1369,19 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
#endif #endif
} }
static void fill_sigtrap_info(struct task_struct *tsk,
struct pt_regs *regs,
int error_code, int si_code,
struct siginfo *info)
{
tsk->thread.trap_nr = X86_TRAP_DB;
tsk->thread.error_code = error_code;
info->si_signo = SIGTRAP;
info->si_code = si_code;
info->si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL;
}
void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
int error_code, int si_code) int error_code, int si_code)
{ {
struct siginfo info; struct siginfo info;
clear_siginfo(&info); clear_siginfo(&info);
fill_sigtrap_info(tsk, regs, error_code, si_code, &info); tsk->thread.trap_nr = X86_TRAP_DB;
tsk->thread.error_code = error_code;
info.si_signo = SIGTRAP;
info.si_code = si_code;
info.si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL;
/* Send us the fake SIGTRAP */ /* Send us the fake SIGTRAP */
force_sig_info(SIGTRAP, &info, tsk); force_sig_info(SIGTRAP, &info, tsk);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment