Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751710AbbLUQwR (ORCPT ); Mon, 21 Dec 2015 11:52:17 -0500 Received: from www.linutronix.de ([62.245.132.108]:50052 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbbLUQwQ (ORCPT ); Mon, 21 Dec 2015 11:52:16 -0500 Date: Mon, 21 Dec 2015 17:51:22 +0100 (CET) From: Thomas Gleixner To: Will Deacon cc: "Shi, Yang" , Catalin.Marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-rt-users@vger.kernel.org Subject: Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint In-Reply-To: <20151221104818.GF23092@arm.com> Message-ID: References: <1450225088-2456-1-git-send-email-yang.shi@linaro.org> <20151216111316.GD4308@arm.com> <5671CD5B.9030907@linaro.org> <20151221104818.GF23092@arm.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 30 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/