From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46B30C433ED for ; Thu, 8 Apr 2021 18:03:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C5B4610CA for ; Thu, 8 Apr 2021 18:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232721AbhDHSDv (ORCPT ); Thu, 8 Apr 2021 14:03:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:34354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbhDHSDs (ORCPT ); Thu, 8 Apr 2021 14:03:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BC08061108; Thu, 8 Apr 2021 18:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617905015; bh=TVPVQSOPkrjYMm2nIE0o8xyEhW/gHJq9F1FdtxW2nU4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2XEgsOT2CCzg9QwpwFv4rtcCHNbgTkAZHAO72l2GDkn1NymQmwgiaBq1sDz7L4yJw yfK3TMiamAUFmOdNNPGVt8xzxm5TuzueWnvtub8Db79Qe6zzohr2ZWpinKb7yL/Kle 5f83XrXzd2qZQExuNjHm9zlxj8FHW2+DOdab5dP4= Date: Thu, 8 Apr 2021 20:03:32 +0200 From: Greg Kroah-Hartman To: Tetsuo Handa Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Petr Mladek , Sergey Senozhatsky Subject: Re: [PATCH 05/13] tty: remove tty_warn() Message-ID: References: <20210408125134.3016837-1-gregkh@linuxfoundation.org> <20210408125134.3016837-6-gregkh@linuxfoundation.org> <92b1f39d-9c9c-c319-a351-f3cb9a1c0497@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92b1f39d-9c9c-c319-a351-f3cb9a1c0497@i-love.sakura.ne.jp> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 10:47:21PM +0900, Tetsuo Handa wrote: > On 2021/04/08 21:51, Greg Kroah-Hartman wrote: > > Remove users of tty_warn() and replace them with calls to dev_warn() > > which provides more information about the tty that has the error and > > uses the standard formatting logic. > > Ouch. This series would be good for clean up, but this series might be > bad for handling lockdep warning syzbot is reporting. Again, we can worry about lockdep stuff for the real places where it matters, which should not have been the same place as all of these were used (they were used very infrequently.) > Since tty_warn() is using plain printk(), we can avoid lockdep warning by > using printk_deferred(). If we use dev_warn() instead, we need to modify > __dev_printk() to use printk_deferred(), which means that all dev_*() users > are affected by this change. I don't want to use printk_deffered() if at all possible, let's let the printk developers fix up their implementation which should make that change not needed. And worst case, take the few places that really really really need it, and call printk_deferred() so it's obvious what we are doing. > Also, we need to modify dev_printk_emit()/dev_vprintk_emit() callers to embed > loglevel into the format string so that we pass LOGLEVEL_SCHED to vprintk_emit() ... > maybe just change from "if (!in_sched)" to "if (!in_sched && !dev_info)" instead ? Huh? No. > Also, dev_vprintk_emit() need to start calling defer_console_output() > after returning from vprintk_emit() in order to behave like printk_deferred(). Again, no. If we really need to deferr a printk, let's call that, but that should not be the case for all of the places these macros were used. thanks, greg k-h