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.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 A30B4C43603 for ; Thu, 5 Dec 2019 01:01:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7741922525 for ; Thu, 5 Dec 2019 01:01:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s0+Rdbci"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XS2aL1cc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7741922525 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iSLJtmRPYjjMG4QSQcbXPyoC5dHACekF+1jPDpEqJTs=; b=s0+RdbcixsgSro XbCMdkf+PZU5SW0MjLT3JVPzuF/ePcZT/ecMaodWTyPZFQtWabKBI19/eYFCH7YgWjo6w6nIgos8G ICwJJ2jn0t3a3f7rhDismDe6T92bJSUFoLaEeKAxiaNdm1jmmKJbeXerA6ZA2CdF6rTqLjAR6msi2 YoPxcqe6svlVquFDB+AuRi6+tgW/PjDnSj2ASUBBsaXx5DXsyL19ZpgqMzkhJlfsvp5H2JCi8NGRv ia4epWYEABxS2d/xR4OGbozIG1VCdwRglaV5I8Vv7g2dcENO0iwCVkOZp+ivVMjQ/hwmGIyNwnbac uyobHssztsmajNSDk/Hw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icfVu-0007JP-1l; Thu, 05 Dec 2019 01:01:02 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icfVr-0007I2-1X for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2019 01:01:00 +0000 Received: by mail-pg1-x541.google.com with SMTP id q127so730639pga.4 for ; Wed, 04 Dec 2019 17:00:58 -0800 (PST) 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:user-agent; bh=8ft6UARj55cMd5qKu+UNVgACeCf359Q/Ufw3Kj1aax8=; b=XS2aL1cceootJu+8FQuJMtqkGMtj0Fgbf3se6DHlc538wfiKjstQwEO1qt9w5qcZqn 8z9kZdyiLpr4cHQ/qxHEYM8zE7dJHwHgLrYernfV/4WFWbdTtuxanpZlw57dOyX4FHTl lucDYm4dGq7nFKqEfG5WAvpxvL23Jb9bqm3wCvjdpaK7guVMDRZZf3oJ691mCiXG3hOP NkWxffEqup0LLm1myeVyBtQ4POQDBgELbyytAxBpdUPnjGz2LsvGqPaGzAEpxcMS1vqC SO4FjxfkCcrprvxg6wbqThuSC9BX5sgyC3UWhTyUa1xLUaI9BsUAHb72qtHR9WhGwvHZ fVag== 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:user-agent; bh=8ft6UARj55cMd5qKu+UNVgACeCf359Q/Ufw3Kj1aax8=; b=F9uZ1rDKykWbmhS1ePZ2ucXy/BGnatqrCdLeNtxhPZl+ZErKVPXCa27G+9wl4o94BH LlUQqndDxp4ZXQuzVSlhkGQrR/9H4N9glenOvyfh8kb7PIeJcCuGVwPfRQBLcnf1NBeK EikYDrjKTayaQEEqf75p5aZiaIgOvBREVSUagqV9YzVRTx90gdws5WtxEU1koSNH0QtJ wSe61r0JjzKfTHlBez6Ajy9kwWbYuURhuQOLjChC36KFvbgpcllVWvuBju+238wvy/tT ln6X/GdalupwZIUam86K5tC1CD1Vs7Ge0JWD+ehutAQLITUOblLsrhQFehzL2IxNmYHd qTCA== X-Gm-Message-State: APjAAAUwYfzsH41DiFWw1sd7GKoz1raYSpxOY5b9zUCtm1OYWVQDPSZ0 ZQhtgtXRjVXrcefa8cjfaTk= X-Google-Smtp-Source: APXvYqyPhn14pl3Csqr/dBGwcPGc1y+PbNIl6fcKXvdKmyD9naKGcJbylv0QHX7gWswMN56VjztUew== X-Received: by 2002:a63:2ac2:: with SMTP id q185mr6593367pgq.417.1575507657801; Wed, 04 Dec 2019 17:00:57 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:250d:e71d:5a0a:9afe]) by smtp.gmail.com with ESMTPSA id y22sm9155228pfn.122.2019.12.04.17.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 17:00:56 -0800 (PST) Date: Thu, 5 Dec 2019 10:00:55 +0900 From: Sergey Senozhatsky To: Qian Cai Subject: Re: [PATCH] char/random: silence a lockdep splat with printk() Message-ID: <20191205010055.GO93017@google.com> References: <1573679785-21068-1-git-send-email-cai@lca.pw> <637027D4-BBDD-4AA6-B03C-556060988957@lca.pw> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <637027D4-BBDD-4AA6-B03C-556060988957@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_170059_095816_E50D78D2 X-CRM114-Status: GOOD ( 14.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pmladek@suse.com, tytso@mit.edu, sergey.senozhatsky.work@gmail.com, Arnd Bergmann , peterz@infradead.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, linux-mm@kvack.org, Catalin Marinas , longman@redhat.com, dan.j.williams@intel.com, will@kernel.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On (19/12/03 13:46), Qian Cai wrote: > > On Nov 13, 2019, at 4:16 PM, 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. > > Sergey, could we have a ACK from you so Ted might be able to merge? Not sure if I can ACK it, but overall it makes sense to use deferred printk there. [..] > > > [cai@lca.pw: add a commit log.] > > Signed-off-by: Sergey Senozhatsky > > Signed-off-by: Qian Cai > > --- > > > > Sergey, please let us know if you are fine with the Signed-off-by. A 'Reviewed-by' will suffice. Reviewed-by: Sergey Senozhatsky -ss _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 9C6F4C2D0BE for ; Thu, 5 Dec 2019 01:01:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5864C22525 for ; Thu, 5 Dec 2019 01:01:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XS2aL1cc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5864C22525 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 068D76B0E1C; Wed, 4 Dec 2019 20:01:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 018F76B0E1E; Wed, 4 Dec 2019 20:00:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E70C56B0E1F; Wed, 4 Dec 2019 20:00:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id D21B16B0E1C for ; Wed, 4 Dec 2019 20:00:59 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 9C656181AEF21 for ; Thu, 5 Dec 2019 01:00:59 +0000 (UTC) X-FDA: 76229283438.13.stage83_5fef6f58bfa49 X-HE-Tag: stage83_5fef6f58bfa49 X-Filterd-Recvd-Size: 4648 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Thu, 5 Dec 2019 01:00:59 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id 6so740763pgk.0 for ; Wed, 04 Dec 2019 17:00:58 -0800 (PST) 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:user-agent; bh=8ft6UARj55cMd5qKu+UNVgACeCf359Q/Ufw3Kj1aax8=; b=XS2aL1cceootJu+8FQuJMtqkGMtj0Fgbf3se6DHlc538wfiKjstQwEO1qt9w5qcZqn 8z9kZdyiLpr4cHQ/qxHEYM8zE7dJHwHgLrYernfV/4WFWbdTtuxanpZlw57dOyX4FHTl lucDYm4dGq7nFKqEfG5WAvpxvL23Jb9bqm3wCvjdpaK7guVMDRZZf3oJ691mCiXG3hOP NkWxffEqup0LLm1myeVyBtQ4POQDBgELbyytAxBpdUPnjGz2LsvGqPaGzAEpxcMS1vqC SO4FjxfkCcrprvxg6wbqThuSC9BX5sgyC3UWhTyUa1xLUaI9BsUAHb72qtHR9WhGwvHZ fVag== 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:user-agent; bh=8ft6UARj55cMd5qKu+UNVgACeCf359Q/Ufw3Kj1aax8=; b=JnkgTRweC4JnZuZd9Tq4W4NhbdxdA7LUkL33Bqvj8JkvKkKmMHHKt0mUvJ5I/s2+9s Z24N4VxLQVxDYx4OM/+JEuZhr9nQRSjWxryVpWlo367DWmWeHNo9LzOhLWEt9LVGAIsA EFh2iAOPoLNvE1Zho3vwsnasz5FsSosXfaFv/ixdhnUInJZdR3ooJHpDaPceUTq3godf pfsgcExd+ooDLES7J3lBGMtiOGbWj0eul/lyuJLd5vQ6J8pnneau08+jqHr2sB43m8N6 W25ATJFfSGIHhdssGGArpJrxGKGHgMcy4P3JkuPS+fubD3C86Awvg556x9cLR3SjmXIO CoqA== X-Gm-Message-State: APjAAAVO+bOEnLIpTBm5eEJAqnN7EGhklNxZ6WWTkGq81V/IraKGzQZq NFeQaoJ8amyw1xu2Jl+QxYI= X-Google-Smtp-Source: APXvYqyPhn14pl3Csqr/dBGwcPGc1y+PbNIl6fcKXvdKmyD9naKGcJbylv0QHX7gWswMN56VjztUew== X-Received: by 2002:a63:2ac2:: with SMTP id q185mr6593367pgq.417.1575507657801; Wed, 04 Dec 2019 17:00:57 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:250d:e71d:5a0a:9afe]) by smtp.gmail.com with ESMTPSA id y22sm9155228pfn.122.2019.12.04.17.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 17:00:56 -0800 (PST) Date: Thu, 5 Dec 2019 10:00:55 +0900 From: Sergey Senozhatsky To: Qian Cai Cc: tytso@mit.edu, Arnd Bergmann , gregkh@linuxfoundation.org, sergey.senozhatsky.work@gmail.com, pmladek@suse.com, rostedt@goodmis.org, Catalin Marinas , 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: [PATCH] char/random: silence a lockdep splat with printk() Message-ID: <20191205010055.GO93017@google.com> References: <1573679785-21068-1-git-send-email-cai@lca.pw> <637027D4-BBDD-4AA6-B03C-556060988957@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <637027D4-BBDD-4AA6-B03C-556060988957@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, On (19/12/03 13:46), Qian Cai wrote: > > On Nov 13, 2019, at 4:16 PM, 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. > > Sergey, could we have a ACK from you so Ted might be able to merge? Not sure if I can ACK it, but overall it makes sense to use deferred printk there. [..] > > > [cai@lca.pw: add a commit log.] > > Signed-off-by: Sergey Senozhatsky > > Signed-off-by: Qian Cai > > --- > > > > Sergey, please let us know if you are fine with the Signed-off-by. A 'Reviewed-by' will suffice. Reviewed-by: Sergey Senozhatsky -ss