Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1071349pxb; Wed, 6 Apr 2022 08:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHfd98erj2vG/K3dZPW0kYZFwxTfR/6nNh71WMta17cHMLEdI+ItZ9BVN464OR89H+5ysk X-Received: by 2002:a65:5b84:0:b0:398:fd62:6497 with SMTP id i4-20020a655b84000000b00398fd626497mr7359026pgr.179.1649257450049; Wed, 06 Apr 2022 08:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649257450; cv=none; d=google.com; s=arc-20160816; b=08MHVhWo1E1CkVwsUHPKChKlSAgnTvl8HgjiuLdGec7MM8Dw9PwrrI1an/IsTuEgay rtuTNukYqnIB7ZMZPy57G2G4T4EzsTaIACuqIIObxhYbSgR3UZlhaHzevBFOCFaKb5QT W+5Nn+XQ7CnTmMEIgLwf4RpQAeEheegzqx3dmnKS/q/E+vvTcfuAuO8v2ru0q2f00qeC znusW1oXTIoXMkVIlhS90HGNUGqZ3zAN9l/ARiOTjioAU7SgwVLTuqjTdlXo09nr2fB5 wQ+L7SYyKj7VeTam7WkWkNxju3+72E5vsiypYUDgJuM8tWrGEVwud9wSsr+53dl8W1tN Xhiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=p6WjyG0D56W0LsXgoOg+5KDf28ARCj8LZvKlXFfllAA=; b=IX5bKmjWBJH1+bj69mkGBtl2jxcTxj7+MvquarA+JCDcG3/kT0vp92QrI+jbsq+x16 rdIp1wKJerKaq5RJtUWnq2ev/m2RHqpYrLczeGfB4mivCKnZffB8gEgTe1pDooROXY91 tn1wPI8lG0ghFYtTUfznQAm5zvbjBl/0GR49IrXT54+eU8L/vWLMfNY0rqJdlQljnaJy VWxiMNuC74j6PBjLCnpMvkfLIlu1+e11jtyiuuse+laOqXtSqMm8o4sv6LhST0Le7rj8 xAlViXSFd5VoiZcrEtlBt6FAyt+JHEXdnDx5p6vbCcyupb4WkNqu4dWgZwfwhDQxlqVW WvYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tdMbJUaF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v7-20020a63bf07000000b0039854fb2001si16686436pgf.496.2022.04.06.08.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:04:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tdMbJUaF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 769C113CCCE; Wed, 6 Apr 2022 05:50:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233127AbiDFM20 (ORCPT + 99 others); Wed, 6 Apr 2022 08:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbiDFM1j (ORCPT ); Wed, 6 Apr 2022 08:27:39 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAFFB3B38FE for ; Wed, 6 Apr 2022 01:18:32 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220406081826epoutp0116e56b3ab56f1f8e5efde1387368d843~jQMXKZpTn1340813408epoutp016 for ; Wed, 6 Apr 2022 08:18:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220406081826epoutp0116e56b3ab56f1f8e5efde1387368d843~jQMXKZpTn1340813408epoutp016 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 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdljTXPeCj2+SwfdlXBYP5m1js7i8X9ui efF6NosdDUdYLd7NlbE4f34Du8Wmx9dYLS7vmsNmMeP8PiaLM4t72R24PDat6mTz2D93DbvH 5iX1Hn1bVjF6fN4kF8AalW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrq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ail-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 Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220406081823epcas2p3789ef3ac3956e4713dd1b55c8a49fb05 References: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(+) -- 2.35.1