Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2155263lqb; Mon, 27 May 2024 09:30:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkkU3+d856fto8ws6Sc7f8shgRGqZ6OEHa3dFHAn2nnu0El0WRaNjesKd1jMpur7tjtC6zCVekhLMg2asCGqznbpTc1miEDPyAlBq7PQ== X-Google-Smtp-Source: AGHT+IGbN06NsqMLlYaUt1lzdYGlDHeCtfi8ne1GXz4uEqCmhxqktwT5fhv+bY5SLAD3l5vxb5zH X-Received: by 2002:a05:622a:4d2:b0:43a:d397:4477 with SMTP id d75a77b69052e-43fb0efee42mr146584461cf.54.1716827406352; Mon, 27 May 2024 09:30:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716827406; cv=pass; d=google.com; s=arc-20160816; b=ZR2Gap3qPzifOWRGXKtMx2F2TCur2yaQP0WZrcLO8fI3tF5UmMfleg7hoPW44RRJvr oyNfQU0qyNRCZ8MNG7sqqh/Pozyes0ApdchfEEV8GgGJ99lcOUPvnG1mYoR1NpNAwnsU gvjCaZUmUjVGeYS0Pqv2ao+Mgf7VwjBJgNNaV8ABx6NdbIHtTSGSD6cEgYgOfqi4AqNP qWhOSDHYno2F4O2LSHartPjgL4Jp0SuDxj2R21RUBMMb/MXdTl8qnYcxkKma08EMgLd+ b/taaHl1QWbiqrAWIUHkkwSY1aELGlyOAKQnV03GI3vIwW79foNlscNHOGIxuJJ2lVWx p7zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=l4JMQmm16LQ4vza9Usv2p7EkveNlgJJeDpkhkQyzzXY=; fh=c891rWQlattzEJWNJXSIs1IyVIBZ6IXxGZzIWIvJNlM=; b=Ze1k2RwCyemijX4ZhvX3/OtPE1iGG+wKXJ0OOPm/Vu8egoCp1Ezzspn+xuVz07Kks/ DgNJBkhQQ4mJcSaIZ3pGhchGu8OdAU0L9OOs9KuvkUPuSi+AML80o9TEblvDKht/06AW bPF0Tn3ipdobL4V9pjIIlQiMhYC4BPBw1yq7ClaRS9ZapRQfvk3+uZk5Q43Yo2XkxlfB w9MvRurkTeCAvy1cg24V/bUBRAHlMpiE/oKHlPu63h7kMou4lVyUKP5tPT0OZIIjL0GL Mg37rWYyTk5l5Ee3FVqK8+qJeJS3VxjwQqAfgYtC74hb90mP/yWJktGRQbf8thB4bVqP /law==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JThKJZTS; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-191238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18c7421si82409751cf.624.2024.05.27.09.30.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 09:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JThKJZTS; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-191238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C0251C22D67 for ; Mon, 27 May 2024 16:30:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5580E155C8F; Mon, 27 May 2024 16:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="JThKJZTS" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 988CD155C8C; Mon, 27 May 2024 16:29:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716827374; cv=none; b=LDE7pIDDSCFVaibGPARlzQKFq/4PlK7ls6u9z3w52VYHOA897HA3MHQE79PfAbOcxSp2pu0RPU9dUUvOPWgLHTgtUQEcXhp2qA98ECEdcSpm398d8TvOf41oYX47y/gI6gHKgZ17cnvDIF2Dx+rcAiwSnG60+w1qbWM09XKdGSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716827374; c=relaxed/simple; bh=ZIrLwguLCcWL9NbjO5PeAwKzODMb0QfIDnQF87pLD5g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=d/opsGCvROPrI3qNpY1U9b6vEE9/lSlPR6bVt+M7tOuXu/ssFjmfqMME2bvL+ToO7kOcCHl9o/r9jYwJL+59jFQ8Zf+Ailf/v0e1FSiooZadmjVM9VODAH5JO4hTlJg1WPFF2QpNpF5QZC5LJxdQ8hTc+VuRvHEKbvRWcfox6HQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=JThKJZTS; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 52C3B240002; Mon, 27 May 2024 16:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1716827365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4JMQmm16LQ4vza9Usv2p7EkveNlgJJeDpkhkQyzzXY=; b=JThKJZTSgvNMB1GQSiRo3fgxkot5wMMGOenXzv5ehnRi4U1fIXhzDmpxoPTl8sVCg8yXtW QA+gOPypaID0Z04NPWV1hxQNXTe/oN4eD+MUGrkKDc8EYw6z1RxQ3FcFP2jdPgxdlgv4h3 7NukpUbT2rX8r1XhP00XokO4dFNI6mmbmBMXgv4PeviW2Yeh6L3ElS4kKWlEYpOlUppw0J 5/69P/pNFbEE51uFD+pVusOGwC7t93fagfI+dpUhctkdPGH0UFrwLtw0nSOPA1JLw8UTxB AYoci1FnA5hS5vh5qERz441W9co5QTQH+7xQucPbASz4kbArKQKpeXqrA2DR2Q== From: Louis Chauvet Date: Mon, 27 May 2024 18:29:17 +0200 Subject: [PATCH] dmaengine: xilinx: xdma: Fixes possible threading issue Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240527-xdma-fixes-v1-1-f31434b56842@bootlin.com> X-B4-Tracking: v=1; b=H4sIANy0VGYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDUyNz3YqU3ETdtMyK1GJdc5OkpFSjlOSk1CQLJaCGgqJUsARQfXRsbS0 AOI9bh1wAAAA= To: Lizhi Hou , Brian Xu , Raj Kumar Rampelli , Vinod Koul , Michal Simek Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Louis Chauvet X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1022; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=ZIrLwguLCcWL9NbjO5PeAwKzODMb0QfIDnQF87pLD5g=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBmVLTkuJyOqjUA7AHg9fbdvDWSyOUooke9+evHq a2C61iZlfSJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZlS05AAKCRAgrS7GWxAs 4kOjD/9D5YRTDgMxefAtrP0NOPdBSUBsC4gsY+kxNvOPfbefXs2D3bITZCvqRfCrX4Y7skq1S1d Org1xM115JmTQNkiqzzX/aSsCIFAxbQj0GvRlp432D4QL9AJmAdpcAYyi56U+hbUdwMbprGTNHu d1x2wDCe5S0f8dkWZ8B2LzioiyiMDvxJ3kcMawQpWOMm4UIgl5iXPoEjcYF14eF4Nk77zht4MC9 UsGYG4Ry/vPvu4i2YLWsoqynelkBWy15zItik9GUxEsI4G0ms+EwMwmw61DhNzdwABZrmiMhiz+ ug3TAfQnuzqyhYx6jkDNtt+tZS/5Zw40HNmhZ+uVLF1e0KKs3yprZ0upvQh5GbNdcSWRGMuNs/u 9kVTj/HGWkX3E6R3meDV+htA8y94IRXxoI5SfNOGthWX+n33wBpABuj/P+q4486OcGdi3cLFH/l m57JI2GxMYlZYXxwVgtS5fusIRoZe9EyBBbu4kZSgfYOW2OLxpyUmNbuOe3wHVkQhkBLzQvj1bY w5VkbnQTUaWflHQWkQPB2cmjD4rqmAFTl6nrLegNI3UOIoI0FXsEYmSshwszWGJJwmfaLvKAQe4 Q3KizdRIYQhJIx+0u9eDj/S3ECdTLvRT2Kpt3brF/Im5ZQwhm1ql/9rvKO01OXgtTHd8Di9DnDj UmKS08MEVTcqI+w== X-Developer-Key: i=louis.chauvet@bootlin.com; a=openpgp; fpr=8B7104AE9A272D6693F527F2EC1883F55E0B40A5 X-GND-Sasl: louis.chauvet@bootlin.com The current interrupt handler in xdma.c was using xdma->stop_request before locking the vchan lock. Fixes: 6a40fb824596 ("dmaengine: xilinx: xdma: Fix synchronization issue") Signed-off-by: Louis Chauvet --- drivers/dma/xilinx/xdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index e143a7330816..718842fdaf98 100644 --- a/drivers/dma/xilinx/xdma.c +++ b/drivers/dma/xilinx/xdma.c @@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id) u32 st; bool repeat_tx; + spin_lock(&xchan->vchan.lock); + if (xchan->stop_requested) complete(&xchan->last_interrupt); - spin_lock(&xchan->vchan.lock); - /* get submitted request */ vd = vchan_next_desc(&xchan->vchan); if (!vd) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240527-xdma-fixes-74bbe2dcbeb8 Best regards, -- Louis Chauvet