From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754262AbdEQK6p (ORCPT ); Wed, 17 May 2017 06:58:45 -0400 Received: from foss.arm.com ([217.140.101.70]:45864 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753506AbdEQK6o (ORCPT ); Wed, 17 May 2017 06:58:44 -0400 Date: Wed, 17 May 2017 11:58:08 +0100 From: Mark Rutland To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Steven Rostedt , Greg Kroah-Hartman Subject: Re: [patch V2 00/17] init: Enable might_sleep() and smp_processor_id() debugging early Message-ID: <20170517105807.GF14654@leverpostej> References: <20170516184231.564888231@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170516184231.564888231@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, May 16, 2017 at 08:42:31PM +0200, Thomas Gleixner wrote: > We recentlty discovered a call path which takes a mutex from the low level > secondary CPU bringup code and wondered why this was not caught by > might_sleep(). > > The reason is that both debug facilities depend on system_state == > SYSTEM_RUNNING, which is set after init memory is freed. > > That means that SMP bootup and builtin driver initialization are not > covered by these checks at all. > > The patch series addresses this by adding an intermediate state which > enables both debug features right when scheduling starts, i.e. the boot CPU > idle task schedules the first time. Thanks again for attacking this. I gave this a spin atop of v4.12-rc1 on an ARM Juno platform. It picks up the mutex issue, and I see no other new warnings. With a fix [1] for the mutex issue appplied, I see no warnings. Feel free to add my Tested-by for the arm64 and common bits. Thanks, Mark. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-May/506558.html