Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3862117pxv; Mon, 28 Jun 2021 15:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfArOIL/YcL0wM4d9SmbRGQ3CqkP36NqM7irh8aWnNZLte+H7ENVJM45/7P9zm14u0S1Nt X-Received: by 2002:a50:cdcb:: with SMTP id h11mr15511428edj.366.1624917717845; Mon, 28 Jun 2021 15:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624917717; cv=none; d=google.com; s=arc-20160816; b=yy995VDE3ajsuzRbQ+Xd4jMTVKZCsP3XatZKXPoH++SlhMuC6yBVMEdYKicG7rhv50 xfoYmrh+To8ZEf8u9RuSC6INKePNJg/4S09su3dRKouzwSDV+Tc9OkH7NKnHmunqal4Z NEQL22xH1Wg+Snxshe/mjD/DsCYxtc6XyF1wLqZYhMFB3vj1VcnpSn7qHjE69Qkx3ksT NFJHbSv4gRkcrCjMrtUbWa+7uEJy33LL7DkljdpXRQ1CdR5gtSS/DvuPVDZtMwJji34+ lYxyR2HRVMPQuopWbl28r3rvz9e/33MwWiohTXDjS01ahohFGf/ZrgR2f5aKBo01NoB6 70TA== 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=oibLxvdNYRGu+5SfarZ9oVhAbIMB0/1Iu0fRtC8+ezo=; b=L//UDmTu7gk19uxQcyexccEutPhh1CEIHMX0w9GrUIjVw959Ic5BSJsWmfEnvYzWAY bhL4TvRH2dCg92+rwqh8v6Kq1mP8blUdHOL+kvq9jPJAk9PtG9KHU28mcTFs4v2Xzuki ZpSSXYWY9XezpPqGUQ1kF5kSF0tB0ruktzM3Cd4Tvmz2SiyfLx+CjNz6jK4DOjBNLHIp n9bOzlHvDTEXSeUaDEYEMCmtmjZlsLzxkRIIkCCRzOZaT31ucSB5bTPDkQdrSZ75An1v s+wdkvILYO/GypvfimA93clmNpH4LsaQ9HuHXRGQuRZhkRNiJlkTSbpLyHWPmAQY6+LY 62MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U4KNT+M0; 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 bz27si15214712ejc.29.2021.06.28.15.01.32; Mon, 28 Jun 2021 15:01:57 -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=U4KNT+M0; 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 S234856AbhF1PXH (ORCPT + 99 others); Mon, 28 Jun 2021 11:23:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:37006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235779AbhF1O7t (ORCPT ); Mon, 28 Jun 2021 10:59:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EEDCA61D5E; Mon, 28 Jun 2021 14:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891242; bh=ygJUikFoBOHvpXqPw40mEBnNIsK8/VMRuBeqtXwJ7ms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U4KNT+M0WR8WEHyvJLD5pkqKiv80fM3ldPCn7+c4E2RoNxaNTj+xdbxNJL9en+pYs W4TKkwxODVW8uCyCIb3oMd8GuHZPLpXRPoXlpW5k3PERM0ZYJjGvet23zyuvnTxjRa TK6q1e27Lqu/3nIzM6do41XQkY8IEMrdEeDgWoFK+/Qh3KWisQVIP686tiCSTbDK1M PAPZgSg+1QM18W8+4+mzYrM4DyDYYYnW0pUD3/Iq3Ll21E9h3fKx9w9B/pCFKpWmr2 3ZBGKZ6bxVbyfjLA3Yn6wV6Ekfgz0N8t3037PSzsu+hYKWZagUld5o0VIXt9DgDCFe mLFFOAJuAeF9g== 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.9 43/71] dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc Date: Mon, 28 Jun 2021 10:39:35 -0400 Message-Id: <20210628144003.34260-44-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.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.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+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 f5a9bb123188..d8997dafb876 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2579,13 +2579,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, @@ -2595,7 +2597,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