From patchwork Wed Apr 6 08:22:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 12802693 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 8BF4CC433F5 for ; Wed, 6 Apr 2022 08:20:02 +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=2cPq+lC29hCINX7bK6+BEDJ7I0hcBzvsNVLO9LoEiZM=; b=iRV8J21bkx4SKX Ziv2Tmphb1HNWv59hr+uqsV+oPoFHP1GKOsdMooaqZvxuBPDKpqNcFbeHeUJ0FkPUFsN+jtIwrScV w00KP8a8iJ2SUENTOOPS4h7zYS+5g+i4IHfinf0c0snlSnpsfRnP7VyA2ihWBj7i56kw2xBomKROc 2vxIuGed4HrWqOUYfpbSOlczMhDwvoi7Ses5toA7l8/FsE+aAMnusbVF4HV07e3JPAcYl6eqfL2cD 0N1/JVxRVZXlMr730RkZIwG6tk3pIiEWtqHLOFkX74QxIUc/3hYywptCd5rMzfNvhrRHGUSrCTps0 bU5ARc1iVlUfM5jXjCeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc0sM-004e4b-0e; Wed, 06 Apr 2022 08:18:50 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc0s4-004dvu-BZ for linux-arm-kernel@lists.infradead.org; Wed, 06 Apr 2022 08:18:35 +0000 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220406081826epoutp032e4f4d70e9796d8977a90fc191484f83~jQMW9XibN2188221882epoutp03Q for ; Wed, 6 Apr 2022 08:18:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220406081826epoutp032e4f4d70e9796d8977a90fc191484f83~jQMW9XibN2188221882epoutp03Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1649233106; bh=p6WjyG0D56W0LsXgoOg+5KDf28ARCj8LZvKlXFfllAA=; h=From:To:Cc:Subject:Date:References:From; b=tdMbJUaF9YSvf0w+99mD5M18K+zcp8N5aIZHiOyzQgEnOiF0Uc+3rU+PC4s59fNYM pdoWMTwg9qjYUmE5vrOYfvzM8I0jzrt8n846lNVAn/LAlhY++MBn/w3O2L7LjTTGhf sLChbohFrI/6GQkdBkw/mQf0SrU7LZJqKfPSDFQU= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20220406081825epcas2p1c18bf3794cd10716a60c54d57ff94777~jQMWZm6392685226852epcas2p19; Wed, 6 Apr 2022 08:18:25 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.91]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4KYHTD2MYjz4x9Q8; Wed, 6 Apr 2022 08:18:24 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id A5.98.40405.0DC4D426; Wed, 6 Apr 2022 17:18:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20220406081823epcas2p3789ef3ac3956e4713dd1b55c8a49fb05~jQMUUFSte1543915439epcas2p3E; Wed, 6 Apr 2022 08:18:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220406081823epsmtrp2dff5487decd39d735a18bc684f7e5ecf~jQMUTRpTe2599125991epsmtrp2b; Wed, 6 Apr 2022 08:18:23 +0000 (GMT) X-AuditID: b6c32a46-ba1ff70000009dd5-12-624d4cd0956f Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 8F.A4.24342.FCC4D426; Wed, 6 Apr 2022 17:18:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220406081823epsmtip16d40a770200b048ea71f777b57d900f4~jQMUFgwZP2385123851epsmtip1R; Wed, 6 Apr 2022 08:18:23 +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 v2 0/1] tty: serial: samsung: add spin_lock in console_write Date: Wed, 6 Apr 2022 17:22:15 +0900 Message-Id: <20220406082216.11206-1-jaewon02.kim@samsung.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdljTXPeCj2+SwfdlXBYP5m1js7i8X9ui efF6NosdDUdYLd7NlbE4f34Du8Wmx9dYLS7vmsNmMeP8PiaLM4t72R24PDat6mTz2D93DbvH 5iX1Hn1bVjF6fN4kF8AalW2Tk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H3iLpZVSizFGYmGWsxFxYkAldYtcyAEAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRmVeSWpSXmKPExsWy7bCSnO55H98kg+9z1C0ezNvGZnF5v7ZF 8+L1bBY7Go6wWrybK2Nx/vwGdotNj6+xWlzeNYfNYsb5fUwWZxb3sjtweWxa1cnmsX/uGnaP zUvqPfq2rGL0+LxJLoA1issmJTUnsyy1SN8ugStj7df/jAVbWCu6FzQwNTCuZ+li5OCQEDCR aD8d1cXIxSEksJtR4umMbexdjJxAcRmJ5c/62CBsYYn7LUdYIYreM0qce/IHrIhNQFvi+/rF YAkRgfOMEpMfv2EDcZgF9jBKrJn9nRmkSljAR2JG20ywDhYBVYnlZ/tZQWxeAVuJRfNes0Cs kJfo/veHBSIuKHFy5hMwmxko3rx1NvMERr5ZSFKzkKQWMDKtYpRMLSjOTc8tNiwwzEst1ytO zC0uzUvXS87P3cQIDmAtzR2M21d90DvEyMTBeIhRgoNZSYS3KtcnSYg3JbGyKrUoP76oNCe1 +BCjNAeLkjjvha6T8UIC6YklqdmpqQWpRTBZJg5OqQamDs3jtkV/JTZKzGPq15jTELIlLCuJ TVPvgF7Ilp19nhss30dZXBR4ELlqR823Nc0fnznOYW4++DRm3vb1B+NfisdlbHy8syh7gtfH ScLGu14wr07Vt7vg59054fdiTtGkiw36+9nC/L0D9iWkiz3jXiB47PjV/hXaJT0n3IOFJXbw VTF7xa3YWzhvEp+SR9Wvh39unmJVfmw4/bV5Tq7LtfXOny5NE3AKmrT4kY7D3HMaLfv3+/Rx aWheVbBjf79yn2Ofut+0Nmsz15BWHWWTar2DG+6dfNoZI1aoWbejy8e4cWWmzCTejG2dxWdO ZM1JuWpySHvRZJMSG74Vq6Od3q5vFu+YmNLYc0n/RpcSS3FGoqEWc1FxIgAjW+vNzwIAAA== X-CMS-MailID: 20220406081823epcas2p3789ef3ac3956e4713dd1b55c8a49fb05 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220406081823epcas2p3789ef3ac3956e4713dd1b55c8a49fb05 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_011833_063232_0B876D74 X-CRM114-Status: GOOD ( 13.61 ) 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" - https://lkml.org/lkml/2012/2/1/495 --- Chnages since v1: - locked variable type changed bool from int - spin_lock() changed to spin_ock_irqsave() Jaewon Kim (1): tty: serial: samsung: add spin_lock for interrupt and console_write drivers/tty/serial/samsung_tty.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)