Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp178311ybb; Tue, 24 Mar 2020 19:35:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtF/5IZmsaxldEaF2633Z+42oT+7fKXjV7kxdWpHE6ZPxlvv3yGXPyNNudsVrunIHmarA3U X-Received: by 2002:a05:6830:2246:: with SMTP id t6mr856601otd.163.1585103742051; Tue, 24 Mar 2020 19:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585103742; cv=none; d=google.com; s=arc-20160816; b=iBVjIsDJXNxhsrFyph2ja/NkWst8rtkxif5gAY6tAEbgQLzQJ9XFnf9UQpfkT/epCt gn3mjETNGvp+sWaVOlQRLNFyhhuhwcS9kMMxl5Yx8qNC4WxHvxL0HkmSeAGcLWIxfhfJ bUdCZTobvfjhgu4G6kGqMho5ylpxL8J7VryL6D5AtcGQblQkcuJRVMWJV8OcIgKWhgRj 58/RDz6qHEI4Cysq2T9cJkRVn3KI0FwOhQskCsZejaeg9opBxVxdKpVPXhBXihoDbe0q /zn97zofj+GfiErjWQrF+7UPoh+mrtyL6dFMXIcRfECWoOG0R2RIFzU9uV/rP/wpWiFD BGlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PCruq4yToUqxgi9otmka3R7GLNMHRYxm71De4g72dIE=; b=WVaDc/hu8N0jPsX/65zc4snXBl1sB7VS4PcXSSJ9o3Pz0+F6qF8cOoH2/o0coVoRJy 1B+/T2v+6edh/6W6ZityVy+ZEmBYYrk5QYSImiGb2MohAg+cbqe9nPSMZ9c25l2rYQX1 5MXFZI0pQVbByM/dvOElej66HK8PEH8FxmcB461luwS9/NW7r7OdXEM78hVOuRyGAbR9 gQ95U3UuNm4afJIyV/pIAdvTWHgUTRqoqVsVA99TKWG7yyveNRoh1KzVK0rcZPKsveXx aKP05BVNIUZ08cIbr6VA28jgishzjG57JmfFdmo9zqWblysl00WHbUG7WKOV1zcsruME ZbOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jx4zznov; 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 t205si10320447oib.49.2020.03.24.19.35.29; Tue, 24 Mar 2020 19:35:42 -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=jx4zznov; 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 S1727316AbgCYCfL (ORCPT + 99 others); Tue, 24 Mar 2020 22:35:11 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:46153 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbgCYCfL (ORCPT ); Tue, 24 Mar 2020 22:35:11 -0400 Received: by mail-pf1-f193.google.com with SMTP id q3so279581pff.13 for ; Tue, 24 Mar 2020 19:35:10 -0700 (PDT) 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; bh=PCruq4yToUqxgi9otmka3R7GLNMHRYxm71De4g72dIE=; b=jx4zznovkVe6XCYL16ne29yitgzvHvZ3wp/VniEpCswbagD3W2AoeE1MOXgpzOx7N8 XFIk69jjrSVZ4PwdB3sRyk4uCWw6L6xOdXQBCT/luaJa1bAYhaEhLo4iFZM8EPeMDPuS EELCJXRdIICqaVkyHduO5Toie/9MNcDWref2p5Hh/JlNMmcm6ezHts2wONoIbJ2gl2U8 AslSM1Yy/pl6VukIPDvRQvQWKH8FTKGFSkXhkRVRPuMZ4c+CTPeCwU3D3k2HoWPPw0D7 ttdJk19L8qTikFSi5lYJaJHuBcEK0E9rgDfVH/vvd//b/6Ioubyw5AJUZCMA0Z5tstOo vGXA== 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; bh=PCruq4yToUqxgi9otmka3R7GLNMHRYxm71De4g72dIE=; b=GsEdECVkuaRqi7qy299TFg748hcIAO9bpwD08eHDGGdblu33rXuaFjgTgkz5GGhP0o JewqZYAb9oMrfTJCEq5cLaPhb6Hlhx4bUXmZ7p37GQwiv9T9ZOYOfNtnxN8lTYpI0Bx0 sCn6FfIKsSDG4UE+qUB9rPZS30S4RlCAevT5uG6kQpQqBINnz9fzjoMa4ee5iD+TnNH3 g+yZt+4lwsRBmugKolJZzreSwtvhp+Sff3PEr8vgXYQtJoRwsE92iBCi/XUX8vyzFjpH t9ZX4jzZIFSptModmLPu2CV7b4aoGEmIiJIYA1cDmr6YkmWo44CdP1LlmuR46vSmcaF6 w3tA== X-Gm-Message-State: ANhLgQ1/SB7/ZHHQFlu7p6cZREciVTe015f5o5yPyURAdScLTbPdiVGZ okuUcUZCT3/UvLc/nwY3Zgg= X-Received: by 2002:a62:7c15:: with SMTP id x21mr1028465pfc.132.1585103709526; Tue, 24 Mar 2020 19:35:09 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:5bbb:c872:f2b1:f53b]) by smtp.gmail.com with ESMTPSA id z17sm17198052pff.12.2020.03.24.19.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 19:35:08 -0700 (PDT) Date: Wed, 25 Mar 2020 11:35:06 +0900 From: Sergey Senozhatsky To: Zygo Blaxell Cc: Qian Cai , tytso@mit.edu, arnd@arndb.de, gregkh@linuxfoundation.org, sergey.senozhatsky.work@gmail.com, pmladek@suse.com, rostedt@goodmis.org, catalin.marinas@arm.com, will@kernel.org, dan.j.williams@intel.com, peterz@infradead.org, longman@redhat.com, tglx@linutronix.de, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: dmesg -w regression in v5.4.22, bisected, was: Re: [PATCH] char/random: silence a lockdep splat with printk() Message-ID: <20200325023506.GB241329@google.com> References: <1573679785-21068-1-git-send-email-cai@lca.pw> <20200324151359.GF2693@hungrycats.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200324151359.GF2693@hungrycats.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/03/24 11:13), Zygo Blaxell wrote: > On Wed, Nov 13, 2019 at 04:16:25PM -0500, Qian Cai wrote: > > From: Sergey Senozhatsky > > > > Sergey didn't like the locking order, > > > > uart_port->lock -> tty_port->lock > > > > uart_write (uart_port->lock) > > __uart_start > > pl011_start_tx > > pl011_tx_chars > > uart_write_wakeup > > tty_port_tty_wakeup > > tty_port_default > > tty_port_tty_get (tty_port->lock) > > > > but those code is so old, and I have no clue how to de-couple it after > > checking other locks in the splat. There is an onging effort to make all > > printk() as deferred, so until that happens, workaround it for now as a > > short-term fix. > > Starting with v5.4.22 I noticed 'dmesg -w' stopped working on some > machines. dmesg will follow console output for a few seconds, then it > stops. strace indicates dmesg is blocked in read() on the /dev/kmsg fd. > If a new dmesg process starts, it gives messages for a few seconds, > then also stops. rsyslog's kernel logging is similarly affected. > > Bisection points to this patch (now known as > 1b710b1b10eff9d46666064ea25f079f70bc67a8 upstream). I can't reproduce > the problem on a test VM, and some machines are running v5.4.22..v5.4.26 > with no dmesg problems. It seems there is some magic in the startup > sequence of affected machines. This code isn't executed after RNG is > seeded, so it would have to get its bad stuff done before that happens. > > Reverting commit 1b710b1b10eff9d46666064ea25f079f70bc67a8 fixes the > dmesg regression on 5.4.26. It might put the original lockdep bug back, > but on machines running stable kernels, I prefer randomly broken lockdep > over repeatably broken dmesg. This should fix the problem https://lore.kernel.org/lkml/20200303113002.63089-1-sergey.senozhatsky@gmail.com -ss