Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3921505pxj; Mon, 21 Jun 2021 09:25:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxwHLuwCAs3ZwwjmoGSVMGz9cMLxZj1np8ca7F1WSnm+Zdiumbmi86DAVBF8+vnFpuYV+P X-Received: by 2002:a17:906:5648:: with SMTP id v8mr25613555ejr.421.1624292708345; Mon, 21 Jun 2021 09:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292708; cv=none; d=google.com; s=arc-20160816; b=brqBdUy+U25XPKGzG1CU+l9ICBR6hatf+jtVkLBINfJ9+yOjJ79G8ou1e87zM/mETe 0SV7Ky+M1YiQf+f5FhpyfDwAfftuUn0RACKSTcoGuK2/qxuyrMoWdPVD5jNe5wIvYN9p 3R5XuUNUpVNBIxmZtNyeAxVqDY/M3E3yIWfabitwmkDaRk60aXvtaCvWKj7ZlTxebn3H gAbHv5Yfmka0vTl9SDjvXKS/sn5uLmptjsnm6BIv5Lau2a61PydDlTXmm0mQiApZWp4i fjEyNb/C/K4qS7iP+ZIwIFV4SlQ1bS0wcLA/TwOmEte9Q+iyfSoUQAKjTKisU+i4eqfF GflQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R4l6S0RY5w55Ox4V0TnBRv63dUzCZ+swVqqMRjbt5w8=; b=pON8Fm88G/9oRm7eYIGguTIuprfLBZvF04abOJ/Uf/ceQAVGTAP2N7cp+FML9GbkeI hxX8MAAndQ64Uyh6jQRc/tzKn/BDUqs5GnF7DOcdki3LzeZL9awC0bTjRIvORpocAsZt YtC7vZXtc7XWOXzBN3V+Ag6DSyMzkSgTGV2KjUYHenTeuYttQwNpGiJZFB/+fG+oPJfW kikcbX07uEnZFtaj/ZtsM9gF2K9jbfO59UlKV9pkfyenyDm76W45SNO2Ba/K4/8894g5 IrDPY86PHP5lnwEFf3LEBKr3KBNyTz278tYUrLA4zwfg8AVy1yI+rt0Uot/DANz3mnZD 1qdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rOXWIBGK; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si13138464edz.527.2021.06.21.09.24.46; Mon, 21 Jun 2021 09:25:08 -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=@linuxfoundation.org header.s=korg header.b=rOXWIBGK; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232009AbhFUQXZ (ORCPT + 99 others); Mon, 21 Jun 2021 12:23:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:39908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbhFUQWC (ORCPT ); Mon, 21 Jun 2021 12:22:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5509611CE; Mon, 21 Jun 2021 16:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292382; bh=1qamf/mhsMAVDAGjAGbKMbTrr2brJAMp6GOrrI9qViM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rOXWIBGKXG6IwbkcvvUMc/pSqqYE8BlibfXetpQ1IlsxqFrbA99/DTqaHNSSgB8EP OCkcLx4NQjFD1JhNIwe0DVCUDgQM5AI59+9bPUARDyDo3kWXghW9zn/zCR38fvvJ8M ILjN0LJ5eZpZuDWqdfi/CFI/7zXwo0m9hivhWwMA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jongho Park , Bumyong Lee , Chanho Park , Vinod Koul Subject: [PATCH 5.4 69/90] dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc Date: Mon, 21 Jun 2021 18:15:44 +0200 Message-Id: <20210621154906.493409027@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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(-) --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2690,13 +2690,15 @@ static struct dma_async_tx_descriptor *p 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, @@ -2706,7 +2708,7 @@ static struct dma_async_tx_descriptor *p list_move_tail(&first->node, &pl330->desc_pool); - spin_unlock_irqrestore(&pl330->pool_lock, flags); + spin_unlock_irqrestore(&pl330->pool_lock, iflags); return NULL; }