From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: Regression in next with use printk_safe buffers in printk Date: Wed, 15 Feb 2017 13:44:44 +0900 Message-ID: <20170215044444.GA1834@jagdpanzerIV.localdomain> References: <20170213185956.GM3897@atomide.com> <20170214160140.GA401@tigerII.localdomain> <20170214161809.GQ6500@twins.programming.kicks-ass.net> <20170214165645.GB10321@tigerII.localdomain> <20170214170335.GS3897@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:36155 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdBOEoZ (ORCPT ); Tue, 14 Feb 2017 23:44:25 -0500 Content-Disposition: inline In-Reply-To: <20170214170335.GS3897@atomide.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Tony Lindgren Cc: Sergey Senozhatsky , Peter Zijlstra , Petr Mladek , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Sergey Senozhatsky , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, John Stultz On (02/14/17 09:03), Tony Lindgren wrote: [..] > > Do not call printk() from tk_debug_account_sleep_time(), because > > tk_debug_account_sleep_time() is called under tk_core seq lock. > > It's not safe to call printk() under tk_core, because console_sem > > invokes scheduled (via wake_up_process()->activate_task()), which, > > in turn, can call timekeeping code again, for instance, via > > get_time()->ktime_get(). This may result in infinite loop on > > tk_core. > > > > Signed-off-by: Sergey Senozhatsky > > Thanks yeah this fixes the issue for me: > > Tested-by: Tony Lindgren thanks. -ss