Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbbKOI1H (ORCPT ); Sun, 15 Nov 2015 03:27:07 -0500 Received: from www.linutronix.de ([62.245.132.108]:35953 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbbKOI1D (ORCPT ); Sun, 15 Nov 2015 03:27:03 -0500 Date: Sun, 15 Nov 2015 09:26:14 +0100 (CET) From: Thomas Gleixner To: yjin cc: Steven Rostedt , mingo@redhat.com, bigeasy@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, jinyanjiang@gmail.com, stable-rt@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func In-Reply-To: Message-ID: References: <1447469598-31876-1-git-send-email-yanjiang.jin@windriver.com> <20151113232512.53df431f@gandalf.local.home> <5646BB4A.50307@windriver.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: 944 Lines: 23 On Sun, 15 Nov 2015, Thomas Gleixner wrote: > On Sat, 14 Nov 2015, yjin wrote: > > > > Use raw_spin_{un,}lock_irq{save,restore} in push_irq_work_func() to > > > > prevent following potentially deadlock scenario: > > > Ug. No, the real fix is that the irq work is to be run from hard > > > interrupt context. > > But if so, we shouldn't call irq_work_tick() in run_timer_softirq(), right? > > The work is marked IRQ_WORK_HARD_IRQ so it should be run from hard irq > context. We only run the work, which is not marked IRQ_WORK_HARD_IRQ > from the softirq on RT. Which does not happen on MIPS as it uses the generic arch_irq_work_has_interrupt() implementation which returns 'false'. 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/