From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10994606A688 for ; Sat, 5 Dec 2026 08:21:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Sn3WrP6f; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IJcfyTJJ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=CzG68Sb58SDh0GwpxiywuEtuGlg3lnnifkpY8obNSQI=; b=Sn3WrP6fOdHqWw fjcKKp76s0x04fJNfbYmRQRFthrpvap9cARKyI/FOVWb3XEgQLwtG0f8f17Zb4jUR4QfoOC1ZT26j 8oPXJPQAjNTtTYi3lfKJF2YBGrWcZ3KzJubwt/5Ud3Youy/5yvjYGXhybclMzjcLuOWUCFp7zpwht 7Saq3HBUYSDRbCGwCLvtFQDIMpj4Cl0deCyhJ2YE59jAmZip/8M3EKyhVkGxdoTy6txqG+gcgDo6O jbGnadvWJyyrujG8wyU4sn9ypssmYUpp91QQXMKePtK0mu5/Bhq7MzokHyNDDkkF3iHtU7vnAIHy+ qH4xn8roqmmoDWDlRaaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZl0w-000000028zF-433Z; Sat, 05 Dec 2026 08:21:02 +0000 Received: from mail-dl1-x1229.google.com ([2607:f8b0:4864:20::1229]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZl0u-000000028ya-2yuz for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2026 08:21:01 +0000 Received: by mail-dl1-x1229.google.com with SMTP id a92af1059eb24-1b5adf7eacdso74076c88.1 for ; Sat, 05 Dec 2026 00:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796458860; x=1797063660; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CzG68Sb58SDh0GwpxiywuEtuGlg3lnnifkpY8obNSQI=; b=IJcfyTJJdgrCx1egsdzdlhbzbD75wM1hD2nqQAxDM72WIqfLzySn5A4xsl3OD85EQ8 xDyOKB2iu1tlDtLiBMIWp83g7wsek6+UI9Nn2iAM0Ifo9FXps2/rKt3EBKINf7yiuoni sCEnAOrjRj093rIsDiGVBrFSQ5Nl6hsmeowU3wkEgvzRMDmMl2HwzBETdun2O0mjSoRN Gaj4PGnVHhgQYll67SaBO/h5xruvUlZS83uokHeR4zH8rJhh2vIeOvZCxcbl5ImUGu4D n9979BogDR9xHJgB+1eJgsJvqDObp2WJpwB3EjXnKRjdOkVOmsHzffaQH9dEykyRoEC9 RN6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796458860; x=1797063660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=CzG68Sb58SDh0GwpxiywuEtuGlg3lnnifkpY8obNSQI=; b=C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Es22skZ2hZm0qZ2GZO4I1+J8aqhwsMxTMQ5KkMjq81JAfcHgThwSXg6N6PahR JsBtEEkySDhD+fODtUV7Vuit1AVs8NJ/ui4QoWpKhBElijrsXMDiO8wdHdorFrYXK43Ilxvg7ty Ty8lzBZjMabXalkrR6sZcNpR5zjOY9+/7wuC++y4WInciIS8WtV25nA3t+53jcFuKqo= X-Received: by 2002:a05:7022:2398:b0:1b4:e533:ff50 with SMTP id a92af1059eb24-1b5d72397afmr6421737c88.40.1796458859921; Sat, 05 Dec 2026 00:20:59 -0800 (PST) Received: from localhost.localdomain (wood.seclab.cs.ucsb.edu. [128.111.49.37]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5d6455949sm14487603c88.9.2026.12.05.00.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 00:20:59 -0800 (PST) From: Praneeth Balasubramanian To: sashiko-reviews@lists.linux.dev Cc: Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/4] tty: atmel_serial: take the port lock in console write Date: Sat, 5 Dec 2026 00:20:57 -0800 Message-Id: <20261205082057.2597000-1-praneethb2002@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: <20261205063536.2519566-1-praneethb2002@gmail.com> <20261205063536.2519566-4-praneethb2002@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261205_002100_765739_1F8EFE70 X-CRM114-Status: GOOD ( 10.58 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Sat, 05 Dec 2026 06:59:02 +0000, sashiko-bot@kernel.org wrote: > [Severity: Critical] > Does taking port->lock here self-deadlock whenever atmel_serial logs while > holding port->lock? [...] > [Severity: High] > Can this self-deadlock against atmel_tasklet_rx_func() and > atmel_tasklet_tx_func() when a hardirq calls printk()? [...] > [Severity: High] > Does this introduce an ABBA deadlock between port->lock and > console_owner on SMP? These are right, so please drop this patch. uart_set_iso7816_config() holds the port lock across atmel_config_iso7816(), which can call dev_err(). The RX and TX tasklets take the port lock with plain uart_port_lock(), so a hard interrupt that prints can spin on it. The SysRq path prints under the port lock too. With this patch the console write takes the same lock in all three cases. The race the patch was meant to close is still there. Fixing it needs more than taking the lock in the console write: no printing under the port lock, irq-safe locking in the tasklets, and SysRq handled after the unlock. Moving the driver to the nbcon console callbacks, as amba-pl011 does, may be the cleaner way. v2 of this series will not include the patch.