Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3892224pxv; Mon, 28 Jun 2021 15:54:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqQe2tVkStziHvjaY+Jgrd64UDyANBCeKZoFpc2xsssjaagVQvYSa8XkoRMJ87lgmOIJqr X-Received: by 2002:a6b:2b04:: with SMTP id r4mr1383162ior.195.1624920868267; Mon, 28 Jun 2021 15:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624920868; cv=none; d=google.com; s=arc-20160816; b=ZjxuXWTIdHMDkGmeZ5e9UKoD+wipI4FFK+gUdPOHTamYym48K7+F/BpWlR6M2bhsLT s8U3YWqhECsujFzFrgDw8nm+Ofv+zk89h+a+YWoBgBK33iSMBVHhdTIxJdINS017RcVK eJOYWx80ICfjHRztbzQbEhXn1F+Gdw9hv+M5+6bzL0r+LzdHJzJHysNxE4a8lnG8nBoQ zja4Y32KowEz4+VX3LqWBuwfRqC/Iw8XAEIbsir+xSLB7ev1kIAdDF7iiYmdNEELR7yh ffBbUEFTNrj/wIzCmzfykyH9q3OBxS8ynkSB5w6O/yEG54Zs7wnYKZdGsOFF0u/BVnD4 MjMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uJZqwYXhdaOphhPGjHZP4BBkJBOG1LRKQA0Dk287hh8=; b=znjpj07L3mR0HB3NidfCv62xSpD8yLMSFEcuLhEZy3rUIXT7dZEEWVyVSKa2TGaqeh vpLyqYm0C3r9SXvVw7etzbZtzj9NFEMdAXeWFuNykUz2lRZOSOc3SVvYrsQIOliCNHkb YsN1OAprVbJ7kB6V0JtN+0DfmPT8Cbm7XSjmPrvws8shy/2jqb2uZ1w2fa35+YWSx/Hf Onj5i9LW09ciogNbFtl39P14RUcDcpAiweXja/+0fJqf5q6SNHC5OxYxTJNd3UhvOJs1 I2gPiBWIIVNJcqdCR9OEFx1Cwy3pdXLeBhLhqqCzs8nPF3BthynPescD//Biu/PBy86J kBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M/8I+N4+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si6393098jai.103.2021.06.28.15.54.14; Mon, 28 Jun 2021 15:54:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M/8I+N4+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238788AbhF1PaV (ORCPT + 99 others); Mon, 28 Jun 2021 11:30:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:39836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237237AbhF1PF1 (ORCPT ); Mon, 28 Jun 2021 11:05:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42ED961CFE; Mon, 28 Jun 2021 14:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891408; bh=nQe34rF7Lrty/+cKhZjeckygj78u5V0t75kW6rxMuF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M/8I+N4+2dbXtndBpXo0Y9EvoqwN7pAt8s0a46yyG1+hDUF4E+7PwQo6kFaeM/WBP EBwAKnMLjJpYsvzLSZ4FxBGgqs+RG+hjmOLx/gDyHPCff3BeJhd36RR8ji5i/ToSBh 39l7U6n7sy6dPPiyTw0wftzglotHxjTX+F25cHepuZkxfXor6Yc9dnOQYAFlWhGh88 iDgQY6JFuvWBShBmmQHOK0M4xT05T/Ko008AtnY7nZkeO4Q/Ot/cVDJ0iMoATze6D5 gxu67DsVboYRDNVT1UeMGXXKFNfCo9YlIsZKYiu23Yphfud7NrCKw5udDZhbqnVMJs b/HyRJFyZ2sLA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bumyong Lee , Jongho Park , Chanho Park , Vinod Koul , Greg Kroah-Hartman Subject: [PATCH 4.4 36/57] dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc Date: Mon, 28 Jun 2021 10:42:35 -0400 Message-Id: <20210628144256.34524-37-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144256.34524-1-sashal@kernel.org> References: <20210628144256.34524-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:42+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bumyong Lee commit 4ad5dd2d7876d79507a20f026507d1a93b8fff10 upstream. flags varible which is the input parameter of pl330_prep_dma_cyclic() should not be used by spinlock_irq[save/restore] function. Signed-off-by: Jongho Park Signed-off-by: Bumyong Lee Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20210507063647.111209-1-chanho61.park@samsung.com Fixes: f6f2421c0a1c ("dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs") Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/pl330.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7f66ae1945b2..6ea993478ddd 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2531,13 +2531,15 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( for (i = 0; i < len / period_len; i++) { desc = pl330_get_desc(pch); if (!desc) { + unsigned long iflags; + dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n", __func__, __LINE__); if (!first) return NULL; - spin_lock_irqsave(&pl330->pool_lock, flags); + spin_lock_irqsave(&pl330->pool_lock, iflags); while (!list_empty(&first->node)) { desc = list_entry(first->node.next, @@ -2547,7 +2549,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( list_move_tail(&first->node, &pl330->desc_pool); - spin_unlock_irqrestore(&pl330->pool_lock, flags); + spin_unlock_irqrestore(&pl330->pool_lock, iflags); return NULL; } -- 2.30.2