From patchwork Tue Apr 5 03:38:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 12801010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 56484C433EF for ; Tue, 5 Apr 2022 03:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:Message-Id:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=9X3zFch05oxBxF1V7hShXjuAirAkMSZi6Vr8foSfcq4=; b=WIqz8aqTAp24J/ ntVy0mWg2dNrmivJ4FnEiDwRmF1LJ67OvhLT2ixPgiN1sTihCVpVknbpvHfv5MrP+9gbg7kZal1ud 9syoOF1XTe1NSSe/Z63ZAmdXYvZyMP0lOzF+N8y/wIVb/Yri8nLxynxt0ggmtZUFHQEkbnVQD1U5K JRMBGEKgRDXpU2A8ffQCRYtLRussnd4/BHWVj/tAzGfkpKhvLdBWx9Uj1MdvQ8ON/dZC1gixplJx+ z1DkSIGv4IztYB8HymJ17FDrracHZHsdSKtSZfg3e1CzyH8+wMhLF4iOjbOdVzstchFIe3d9/2L/R ZDfGkR1HsmjGlm9sv7iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbZyD-00H1Kk-Uv; Tue, 05 Apr 2022 03:35:06 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbZyA-00H1HV-Vj for linux-arm-kernel@lists.infradead.org; Tue, 05 Apr 2022 03:35:04 +0000 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220405033451epoutp02110b11888bb790cab7634e520fe20ab3~i4reSewB-3193331933epoutp02B for ; Tue, 5 Apr 2022 03:34:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220405033451epoutp02110b11888bb790cab7634e520fe20ab3~i4reSewB-3193331933epoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1649129691; bh=qUlOPPIbR6YFqeEuSn7ct6fr2SJy8qYqqBrlE7bN7cI=; h=From:To:Cc:Subject:Date:References:From; b=VsANSiajmWs+9Ls6bbGu+AUcCLLiAqP1FCP4pZwqIbpLT+Gp5Cf02LGa+QX4Sri5g +XbphmrJmhlhODErIOkhqEIqnC5SGxfBAeTMfD5SoPxLKJF5m/Kg2jz41pXgDFnTrp aKaeASpynf2QLVNJIgCtWtMrwYJCFbTf1uxUdlJo= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220405033450epcas2p45d401a8cb68ffb7eec84a252a2f0d68d~i4rdcVowT2398623986epcas2p4J; Tue, 5 Apr 2022 03:34:50 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.99]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KXYDT2TXRz4x9Q3; Tue, 5 Apr 2022 03:34:49 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id B2.5F.10444.9D8BB426; Tue, 5 Apr 2022 12:34:49 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20220405033448epcas2p31f211cf1cd702ad647f75eee36b2d9f4~i4rbnEBH20326203262epcas2p3C; Tue, 5 Apr 2022 03:34:48 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220405033448epsmtrp2b36ff8e652599ca242fac2b6922bcfed~i4rbmUwiH2142621426epsmtrp2c; Tue, 5 Apr 2022 03:34:48 +0000 (GMT) X-AuditID: b6c32a45-4fdff700000228cc-c4-624bb8d95073 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id D9.95.03370.8D8BB426; Tue, 5 Apr 2022 12:34:48 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220405033448epsmtip2ab440b9b977be13dd7de76aa829f1e0a~i4rbX7byC0875008750epsmtip2_; Tue, 5 Apr 2022 03:34:48 +0000 (GMT) From: Jaewon Kim To: Krzysztof Kozlowski , Greg Kroah-Hartman , Alim Akhtar , Jiri Slaby , linux-samsung-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Chanho Park , Jaewon Kim Subject: [PATCH 0/1] tty: serial: samsung: add spin_lock in console_write Date: Tue, 5 Apr 2022 12:38:53 +0900 Message-Id: <20220405033854.110374-1-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdljTTPfmDu8kg0WNfBYP5m1js7i8X9ui efF6NosdDUdYLd7NlbE4f34Du8Wmx9dYLS7vmsNmMeP8PiaLM4t72R24PDat6mTz2D93DbvH 5iX1Hn1bVjF6fN4kF8A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rb7nMGm62Fqm8sSa2kMmCtfOnlZiKc5INNRiLipOBACP7d2iIAQAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLLMWRmVeSWpSXmKPExsWy7bCSvO6NHd5JBue/qVs8mLeNzeLyfm2L 5sXr2Sx2NBxhtXg3V8bi/PkN7BabHl9jtbi8aw6bxYzz+5gszizuZXfg8ti0qpPNY//cNewe m5fUe/RtWcXo8XmTXABrFJdNSmpOZllqkb5dAlfGv4e3WAtmsVSc2N7C1sC4gbmLkZNDQsBE Yt7ZX0A2F4eQwA5GibNr9jJCJGQklj/rY4OwhSXutxxhhSh6zyixb+YqsCI2AW2J7+sXgyVE BM4zSkx+/IYNxGEW2MMosWb2d7AdwgKeEmtXTGUBsVkEVCUamjayg9i8AnYS8xfdYYFYIS/R /e8PC0RcUOLkzCdgNjNQvHnrbOYJjHyzkKRmIUktYGRaxSiZWlCcm55bbFhglJdarlecmFtc mpeul5yfu4kRHMJaWjsY96z6oHeIkYmD8RCjBAezkghvTpBnkhBvSmJlVWpRfnxRaU5q8SFG aQ4WJXHeC10n44UE0hNLUrNTUwtSi2CyTBycUg1MlgUSXxhf1M4Sini5VWpKzY1Z+jesJ9cW hpvPuF006dLVOIVVyffdJEq3sukHPnn//+QygW7vMHP3uG9vdSzyrkksfpzj777mcmPyuWsP GDlb/9dfffTm0fxby+1lJRa1dD98a3QvbbKe1bR/Tmkn6myteQVdFzUULRG76vT5XJnIqZmR Yp9kXt7N2Vvm+4tjamSw6FtlyzURi7qMXm+dsy/v/VeDVTOzFhutO/h7dvdkPnM/i6hw/S9N rBfL7MMUt/XahpjaT/l2boanyu/Va2QT7thsMZfxWsxdH3F3m7HtirkPBCLjns4zPm595NDX 9mX9tz5UnaqI8Xp+V0xR6vChZGmvEqmHUdvu9Fk9VWIpzkg01GIuKk4EAGhdkEHQAgAA X-CMS-MailID: 20220405033448epcas2p31f211cf1cd702ad647f75eee36b2d9f4 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220405033448epcas2p31f211cf1cd702ad647f75eee36b2d9f4 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220404_203503_584426_5B90DCD3 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When console and printk log are printed at the same time, they are called through tty driver and console driver concurrently. In this case, this could lead to potintial issue that data loss or fifo full. This issue also occurred with other drivers and has been fixed. "serial: amba-pl011: lock console writes against interrupts" Jaewon Kim (1): tty: serial: samsung: add spin_lock for interrupt and console_write drivers/tty/serial/samsung_tty.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)