Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753929AbdCHQvW (ORCPT ); Wed, 8 Mar 2017 11:51:22 -0500 Received: from mail.kernel.org ([198.145.29.136]:59758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbdCHQvT (ORCPT ); Wed, 8 Mar 2017 11:51:19 -0500 Date: Wed, 8 Mar 2017 11:51:14 -0500 From: Steven Rostedt To: Laurent Dufour Cc: Andrew Morton , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar Subject: Re: RFC: SysRq nice-all-RT-tasks is broken Message-ID: <20170308115114.4e20fc73@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; 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: 936 Lines: 27 On Wed, 8 Mar 2017 16:23:35 +0100 Laurent Dufour wrote: > I got it on Power and on X86_64, but I guess it should happen in all > architectures. > Here are the steps to recreate it : > 1. Create a RT task : sudo chrt -f 50 /bin/sleep 999999 > 2. On the console trigger the 'nice-all-RT-tasks' SYS-RQ. > > The panic is triggered by the BUG_ON(in_interrupt()) introduced by this > commit: > > 66e5393a78b3 ("[PATCH] BUG() if setscheduler is called from interrupt > context") > > Since SysRq is run from the interrupt context, the panic is expected. > > Looking at the code, I'm wondering if the BUG_ON() is still required in > __sched_setscheduler(). But I'm not so confident, so requesting your > advise here. > Hmm, that commit was added in 2.6.18, and you're right, a lot has changed since then. Have you tried removing it and running it under lockdep, and see if it triggers any warnings? -- Steve