Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint

From: Thomas Gleixner
Date: Mon Dec 21 2015 - 11:52:20 EST


On Mon, 21 Dec 2015, Will Deacon wrote:
> +static void send_user_sigtrap(int si_code)
> +{
> + struct pt_regs *regs = current_pt_regs();
> + siginfo_t info = {
> + .si_signo = SIGTRAP,
> + .si_errno = 0,
> + .si_code = si_code,
> + .si_addr = (void __user *)instruction_pointer(regs),
> + };
> +
> + if (WARN_ON(!user_mode(regs)))
> + return;
> +
> + preempt_disable();

That doesn't work on RT either. force_sig_info() takes task->sighand->siglock,
which is a 'sleeping' spinlock on RT.

Why would we need to disable preemption here at all? What's the problem of
being preempted or even migrated?

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/