Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp709019pxf; Thu, 8 Apr 2021 11:06:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjCOsHHGcEdWBtcbICJhXscr6wD2MhqdN10be2YG4WmnQOGnsf8LSNiVS9eKOkKD6OanLM X-Received: by 2002:a17:906:9906:: with SMTP id zl6mr12197224ejb.365.1617905168482; Thu, 08 Apr 2021 11:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617905168; cv=none; d=google.com; s=arc-20160816; b=lYufpOgzAWYKGw5mKH6wBkLMomnJADTYWgn/pWFgT3Rjv6zhbqMT1xvXUZMconNlk2 nsM99Xpo57MsI3x9BbH5Uw3NSHmGTErjyrkVtdWRyNW0YF0bazariwTbixFLA/wk1D/z k7ed34kfM+VaJVo5+ePVTy780dfcnwmRcQPpbJ2wHZCHllbX8tYre66Hvw5GTfliVR2f +bw9PyCyCc49kn4tE5I2fLFFGJxWl63gJL/w/Y/X0b6JH0cgjWSFFnkA1Ss4dG+YnOSu bGbMDT3I3r/Sl2xa05vb6O+KCqOcXlOmguiLsMGYli+iRrKvlAQwqe5s2Ioz4EC7wJF9 U3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CQf4L1imJpHCD+9BViaPMdU4uluFzbygBRPb5wDJh90=; b=r/OJZYQAphkBCtIUd5/VP2kow+Jm9wpSCdJCG1fyWdkuQU62o1nYrbvLxWOhpV/7jn b7hs+wMDITRM9vHTUgMWvAtzgmSETZfh6Iv+NgY/oS2LXAk0kMRwIXEsEa6dZxczFDpT +es+OShEg5ijk1jGeJFKcZVfjv2Ki2VLqdjLOmcVMk9A1EbT90qc0nVYWO4e9Xe41oUR BCpvX5QZafkiDpM/jsfexldp2Tx+qodo8ahwMLAGUjaiZz+L7cjpCtLdaiHbNA+rcZZn W/CYWnfQEbR2fie864AoMV8uWjdB6NCLvzJ7FCwdNwSKTHIYIeP15OY78hktOYTPDlBR aGwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2XEgsOT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si1266545ejx.679.2021.04.08.11.05.41; Thu, 08 Apr 2021 11:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2XEgsOT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232604AbhDHSDt (ORCPT + 99 others); Thu, 8 Apr 2021 14:03:49 -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