From patchwork Thu Feb 16 01:31:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 9576179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B30DE60244 for ; Thu, 16 Feb 2017 01:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A33C828556 for ; Thu, 16 Feb 2017 01:30:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 957332857E; Thu, 16 Feb 2017 01:30:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31DED28556 for ; Thu, 16 Feb 2017 01:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751518AbdBPBav (ORCPT ); Wed, 15 Feb 2017 20:30:51 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33953 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbdBPBau (ORCPT ); Wed, 15 Feb 2017 20:30:50 -0500 Received: by mail-pg0-f65.google.com with SMTP id v184so373246pgv.1; Wed, 15 Feb 2017 17:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yG/LwYxHM+61Lz9fnZj5OuknfIIBd6PUSa+NhsTju4Y=; b=trFSfiObEsrW53cNXEG5ks5qgJ5bfSUiLkSUPpSCpDP7TUOlqJhT1L7+MIQZxFX8m9 CYXmWzmbWJQhHbKaKGGUn0NixRnxmO6v1ZUZ3ZoiUNPtAtzJ2LOTANQoL9Z6UnP4N6kS V4AXAWCnSrjisFzx+Ts3RknATlOuXAg/AdUVOnVMT7O3BgrydYXkblvrzmA8/C6Oeet7 qyIufm5lBfkDB/2qAbfeu8FT97jcs5J6ag9LZpBv+/9WyQaqmYBmvs1mXhu3FT0ac7Tb mzIMg97jZvgjV12kyNfbMtum9D7eLdcp7CHuqbZQ4WseGPaBy5TTWNNYJErWnTsVe26V 8/iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yG/LwYxHM+61Lz9fnZj5OuknfIIBd6PUSa+NhsTju4Y=; b=pTwD3qq0ZUMDirYKoQxaylXT4n1eKjvFiKgTw4xHIsP6yMT1XLZkxZ/a/KcB5vypMm 1JnjOBdEr9dWEcrUoRlOZd7kzZqUTSeKLKqEInDKkCKiaD5TJI/vbq3RaJ4810M+WhDA 0PMto5hvEBupjBoFp7P/LsdISBwGJxop/Na8nOe2bhMOZaEXPqzGvX3jFM/kUZ+OjDYA Urs4UJ6b9yDamMrj4xkY56SgLqkOx73f5bzCny1jgnRRoSl8JNS7wxCHJ2RGjAHVsJlw 0zIT2MVzlkCZAIsczcPjvE9mpX6tCumLn0A7aSA75tauQ6VzDHGJRilBUPySkfzk7W0d b5hA== X-Gm-Message-State: AMke39k8MJsMp3F+iJbwClQGE6wg92Hdgc62aC2Vl0n9dmU8Xhwl9V3Za/nQDvOsQKxnBQ== X-Received: by 10.99.227.5 with SMTP id f5mr42705806pgh.102.1487208649577; Wed, 15 Feb 2017 17:30:49 -0800 (PST) Received: from localhost ([39.7.52.238]) by smtp.gmail.com with ESMTPSA id s64sm9698115pfe.27.2017.02.15.17.30.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2017 17:30:48 -0800 (PST) Date: Thu, 16 Feb 2017 10:31:09 +0900 From: Sergey Senozhatsky To: Tony Lindgren Cc: Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Peter Zijlstra , Thomas Gleixner , linux-kernel@vger.kernel.org, Sergey Senozhatsky , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Russell King Subject: Re: Regression in next with use printk_safe buffers in printk Message-ID: <20170216013109.GA772@jagdpanzerIV.localdomain> References: <20170213185956.GM3897@atomide.com> <20170214160140.GA401@tigerII.localdomain> <20170215180158.GO21809@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170215180158.GO21809@atomide.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On (02/15/17 10:01), Tony Lindgren wrote: [..] > Below is another issue I noticed caused by commit f975237b7682 that > I noticed during booting. do you mean that with f975237b7682 you _always_ see that illegal RCU usage warning? > 8< -------------------------- > [ 2.581939] hw-breakpoint: Failed to enable monitor mode on CPU 0. > [ 2.591613] hw-breakpoint: CPU 0 failed to disable vector catch > [ 2.597686] > [ 2.597717] =============================== > [ 2.597717] [ ERR: suspicious RCU usage. ] > [ 2.597717] 4.10.0-rc8-next-20170215+ #119 Not tainted > [ 2.597717] ------------------------------- > [ 2.597717] ./include/trace/events/printk.h:32 suspicious rcu_dereference_check() usage! so this is trace_console(text, len) from cpuidle_enter_state() ... vprintk_emit() << error: Failed to enable monitor mode/CPU 0 failed to disable... console_unlock() call_console_drivers() trace_console() > [ 2.597717] > [ 2.597717] other info that might help us debug this: > [ 2.597717] > [ 2.597717] > [ 2.597717] RCU used illegally from idle CPU! um... is this what rcuidle() for? Tested-by: Tony Lindgren --- --- I need to look more at this. -ss > [ 2.597717] rcu_scheduler_active = 2, debug_locks = 0 > [ 2.597747] RCU used illegally from extended quiescent state! > [ 2.597747] 2 locks held by swapper/0/0: > [ 2.597747] #0: (cpu_pm_notifier_lock){......}, at: [] cpu_pm_exit+0x10/0x54 > [ 2.597747] #1: (console_lock){+.+.+.}, at: [] vprintk_emit+0x264/0x474 > [ 2.597747] > [ 2.597747] stack backtrace: > [ 2.597778] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc8-next-20170215+ #119 > [ 2.597778] Hardware name: Generic OMAP4 (Flattened Device Tree) > [ 2.597778] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 2.597778] [] (show_stack) from [] (dump_stack+0xac/0xe0) > [ 2.597778] [] (dump_stack) from [] (console_unlock+0x5e8/0x650) > [ 2.597778] [] (console_unlock) from [] (vprintk_emit+0x270/0x474) > [ 2.597778] [] (vprintk_emit) from [] (vprintk_default+0x20/0x28) > [ 2.597808] [] (vprintk_default) from [] (printk+0x20/0x30) > [ 2.597808] [] (printk) from [] (reset_ctrl_regs+0x108/0x288) > [ 2.597808] [] (reset_ctrl_regs) from [] (dbg_cpu_pm_notify+0x28/0x30) > [ 2.597808] [] (dbg_cpu_pm_notify) from [] (notifier_call_chain+0x44/0x80) > [ 2.597808] [] (notifier_call_chain) from [] (cpu_pm_exit+0x2c/0x54) > [ 2.597808] [] (cpu_pm_exit) from [] (omap_enter_idle_coupled+0x80/0x208) > [ 2.597808] [] (omap_enter_idle_coupled) from [] (cpuidle_enter_state+0x118/0x4ac) > [ 2.597808] [] (cpuidle_enter_state) from [] (cpuidle_enter_state_coupled+0x3a8/0x40c) > [ 2.597839] [] (cpuidle_enter_state_coupled) from [] (do_idle+0x1a4/0x218) > [ 2.597839] [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) > [ 2.597839] [] (cpu_startup_entry) from [] (start_kernel+0x35c/0x3d4) > [ 2.597839] [] (start_kernel) from [<8000807c>] (0x8000807c) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 7180088cbb23..34da86e73d00 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1563,7 +1563,7 @@ static void call_console_drivers(const char *ext_text, size_t ext_len, { struct console *con; - trace_console(text, len); + trace_console_rcuidle(text, len); if (!console_drivers) return;