Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752302AbbKNEZS (ORCPT ); Fri, 13 Nov 2015 23:25:18 -0500 Received: from smtprelay0175.hostedemail.com ([216.40.44.175]:43189 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751573AbbKNEZQ (ORCPT ); Fri, 13 Nov 2015 23:25:16 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2904:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4250:4605:5007:6119:6261:7576:7875:7903:9707:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12295:12296:12438:12517:12519:12740:13069:13311:13357:14096:14097:14659:21080:30041:30054:30069:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: eye20_10923c24cf34f X-Filterd-Recvd-Size: 1899 Date: Fri, 13 Nov 2015 23:25:12 -0500 From: Steven Rostedt To: Cc: , , , , , , Subject: Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func Message-ID: <20151113232512.53df431f@gandalf.local.home> In-Reply-To: <1447469598-31876-1-git-send-email-yanjiang.jin@windriver.com> References: <1447469598-31876-1-git-send-email-yanjiang.jin@windriver.com> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 33 On Sat, 14 Nov 2015 10:53:18 +0800 wrote: > From: Yanjiang Jin > > This can only happen in RT kernel due to run_timer_softirq() calls > irq_work_tick() when CONFIG_PREEMPT_RT_FULL is enabled as below: > > static void run_timer_softirq(struct softirq_action *h) > { > ........ > if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL) > irq_work_tick(); > endif > ........ > } > > 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. Moving the scheduling of high priority real-time tasks to ksoftirqd defeats the purpose. The question is, why is that irq work being run from thread context when it has the IRQ_WORK_HARD_IRQ flag set? -- Steve -- 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/