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 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 D99F6C001E0 for ; Mon, 23 Oct 2023 08:58:52 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=boa4VBv3doGtbUk6rzlCFuKAHMJ/MDIwHNqofpwPWa4=; b=yqcnxNBxfWUUEw gXYUZo96Thlkmsq8chMTiep9iT58gBj1xrp6VH4ntCKV2cmCX4tQzEfgJW5mkcqw8ETnlCaveMWc5 MhTJB86qSXKJH4OjVDOjtnlgAVyVK5h99pRE9hJG0iEB2Lv659VF7TxmpDnI31Nkh79PVV59cnagL NLx6w//zeAmNBNPm3os5fNn4BMwWfNSm9FGpQZFnrGTXLys+tXIecGF+Iaz+yOQIHakrjDZr8tKuq Iu/yyr8UIseZ4MDHyNZ7o9ChLOD94a8ZFb+dtVeUmSlB4jDJEPrFWjqQ43BC+N49sVBtpoi+Wqq+I 9XkT0gsRNymLVS+bd3oQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1quqlY-006pwQ-32; Mon, 23 Oct 2023 08:58:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1quqlV-006pvU-1z for linux-arm-kernel@lists.infradead.org; Mon, 23 Oct 2023 08:58:26 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CBA932F4; Mon, 23 Oct 2023 01:59:03 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3730F3F64C; Mon, 23 Oct 2023 01:58:22 -0700 (PDT) Date: Mon, 23 Oct 2023 09:58:19 +0100 From: Sudeep Holla To: sean yang Cc: cristian.marussi@arm.com, linux-arm-kernel@lists.infradead.org, Sudeep Holla Subject: Re: [PATCH] firmware: arm_scmi: Add lock for mailbox do_xfer Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_015825_722099_829A892C X-CRM114-Status: GOOD ( 10.70 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Xinglong, Cristian has already given reason why this change is wrong. I wanted to let you know that you need to still fix your email. On Sun, Oct 22, 2023 at 08:15:17PM +0800, sean yang wrote: > The function do_xfer may cause multithreading send message at almost the > same time. > > send_message will write the message in the shared memory, This causes the > second write > > to overwrite the first write, resulting in the loss of the first write. > > Add lock to avoid this situation. Release lock when the message has > responded. > This looks like either copy-pasted or some wrong format(html?). Use git send-email if you are not already to send any patch on the list. This is definitely wrong format and no one can apply this patch. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel