Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp38728imm; Thu, 31 May 2018 18:01:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKT0k3wS5zvGxgeis74GR/vS0XBdSxbZGr4PELCDAsCCNh0biE8Ow+F63TgqHjE78NRexNV X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr8791971plg.229.1527814882099; Thu, 31 May 2018 18:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527814882; cv=none; d=google.com; s=arc-20160816; b=Wr5ZVKGkZEus2zgjIULywIXT00zUgUU8bXB+qnwLGH5O9t9uOvVNNmQa/h26mG7ztk RHPyMCxB1ghRGP7XbAmfpkAf7mAIGJX1puvTxOWVx9lAri0YN9FXvZnTmMWOhNG885YJ Y7gqsHwLVi+TBsPYOaCllzmBiCgIfnwAhkqljFaONZWRCJ6Rsg9DoCc+pUFvLjOgpo2m 2FkQI9GPD8/kp2adeKTHTQ/gPnqQHi+YRatzFtbTYez+P2Wjg56CeT1fLm5EnWVG0eVQ +gGlsomcACravrW1Q2t58w/3otlM6opZ45R81nbn5XlWrI7hGqVdRNaN3qpQoT22jobK 1Xkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=u+3ocMqswK7ymzHj5xKWSMZk2olcDifKtPAQ+yRa8Ds=; b=qkOAYQJOHdGCQqJwbLyqi+TQA3u/DrsXm4nri95vyHaIJGjPcQIiZ0esg+g6OPNJXZ pVi8TyOXmwB8QjKXJfZTvdfA2ymzP1oG/6SYz6dlf6p9pRXiWhZCxrY9TOohT7vGdU8R 69YeodZpEqcx09rXqFj3zkRGg7zI+nA8hfXGHYIH6rvAoQQ7k7w9KwIE06W/1g1JGvTc tV+T/MTio2Ukww5G1rJFjmdQ8RR1jSMht6x/lswCtZLF3u62Y0Dl1UhMAjMBVtOgI42s d+5fu5bK6tFYOQZnOkorxPbKSNfevmiA/xnmiA53YMSGEKl94VyMcNMKRq3M1W39Qwew 2M8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qWMxMYj4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12-v6si29895507pgu.115.2018.05.31.18.01.07; Thu, 31 May 2018 18:01:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qWMxMYj4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751230AbeFABAO (ORCPT + 99 others); Thu, 31 May 2018 21:00:14 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:44675 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeFABAB (ORCPT ); Thu, 31 May 2018 21:00:01 -0400 Received: by mail-pf0-f182.google.com with SMTP id h12-v6so1689300pfk.11 for ; Thu, 31 May 2018 18:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=u+3ocMqswK7ymzHj5xKWSMZk2olcDifKtPAQ+yRa8Ds=; b=qWMxMYj43uPdfDVMITB3AJKbqRBUKSxI2OggjtRIde4dTQGjVd99F006YkIh4bOFEE xIsAkaRTQqEeNZX74Zz4ldTnj6V1DpW6/kiEcHkXQ9ML+z4I/HJXEdeJoWfR/fGc5bb9 5Chvsf0zFYRDVizshhh3bPhQGpJDzYx8SUrxF8CtIcc2VpvL72oNFmguG/DW5P+r6Y61 Uwymbr/kANuDnRlvihoTcMaMHoQ7cXudwgR83RSZrLhRbz9AqrXEeAY6s+08VrEegw01 Dsne+C51lrRklvHJAIjcbK0wDLVa285yx38JK2w+DFkb1oEwB26R+DY6UKZ3qOVEEPHi Df1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=u+3ocMqswK7ymzHj5xKWSMZk2olcDifKtPAQ+yRa8Ds=; b=IJ+WmfCzq5m+O3njio3sWfaej1WpR78rRUdsdAh1EOBMXgDvbzxdf0jViLmGJFLMoh 0IOcbTooI86N+hKdO2QnPE892n78690kwKKK/1Eu2kn1YOmLA9p4EOhBtrQL6s5tVkC1 tTmZWLaSIAJxxtYZoE9mbsAcDzTYDLyOz7dGoEwOuyJVJXsvhRpfKVth20wzMLuLl1J7 pRB/Srspp5ZugaWRfs/TAq6slA18D4ZYdqKj4c1Lcls2UHZAbRA9+ZquqtvB6awdibcb xrnSrvTXpalI3xShPIzbloMhppa0WdjLNu1LYO476UkEquPtCrga7UWZCGPTrka55oCK hkzQ== X-Gm-Message-State: ALKqPwdZX2o34OT5taNGZNxnEp3ptXyxbm/xs37eQlgAVLDMZK27Lcqa HoG23obEAVlBPGbFCIwejeo= X-Received: by 2002:a62:2394:: with SMTP id q20-v6mr8802434pfj.1.1527814801317; Thu, 31 May 2018 18:00:01 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.70.46? ([2402:f000:1:1501:200:5efe:a66f:462e]) by smtp.gmail.com with ESMTPSA id y1-v6sm18449928pfm.87.2018.05.31.17.59.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 18:00:00 -0700 (PDT) Subject: Re: Can printk() sleep at runtime? To: Steven Rostedt , Geert Uytterhoeven Cc: Stephen Boyd , Linus Torvalds , Petr Mladek , Bjorn Helgaas , SergeySenozhatsky , Al Viro , Greg Kroah-Hartman , Jonathan Corbet , Linux Kernel Mailing List , Thomas Gleixner , Geert Uytterhoeven , Michael Turquette References: <20180531100457.fncibp5cxdozvbjh@pathway.suse.cz> <152777998940.144038.2717154952249020053@swboyd.mtv.corp.google.com> <20180531171308.08474a70@vmware.local.home> From: Jia-Ju Bai Message-ID: Date: Fri, 1 Jun 2018 08:59:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180531171308.08474a70@vmware.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/6/1 5:13, Steven Rostedt wrote: > On Thu, 31 May 2018 18:42:48 +0200 > Geert Uytterhoeven wrote: > >> Hi Stephen, >> >> On Thu, May 31, 2018 at 5:19 PM, Stephen Boyd wrote: >>> Quoting Linus Torvalds (2018-05-31 07:32:10) >>>> On Thu, May 31, 2018 at 5:05 AM Petr Mladek wrote: >>>>> Anyway, we need to fix or remove this format. vsprintf-like functions >>>>> are called in any context and nobody expect that they might sleep. >>>> Ack. I guess the argument is that "%pCr" is rare, and none of *those* >>>> users may care, but I do think that doing things wrong as-is. >>>> >>>> It's too subtle to have to know you're in a particular locking context >>>> when you use a particular %p modifier. >>> Agreed. Removing the format seems to be the best approach. It looks like >>> only Geert has used it in the last few years and it hasn't been used >>> much otherwise. >> Indeed, just 3 users (the broadcom one isn't mine): >> drivers/clk/renesas/renesas-cpg-mssr.c >> drivers/thermal/broadcom/bcm2835_thermal.c >> drivers/tty/serial/sh-sci.c >> >> Alternatively, can we have a special version __clk_get_rate() that just >> returns clk->core->rate? >> Or would that be too inaccurate in the presence of CLK_GET_RATE_NOCACHE? >> The function could still return 0 in case the flag is set. > If it's only used in three locations, I think it would be better to > simply remove it from vsprintf() and have the three callers call > clk_get_rate() directly. Agreed. Best wishes, Jia-Ju Bai