Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3930453pxj; Mon, 21 Jun 2021 09:36:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9eqMKZpxWV9GM5xHzKndwVq+PZm1y5/HUS40CfZk0llFBjQ8Qh5Vdampi2b3jgSgWqE3o X-Received: by 2002:a5d:914a:: with SMTP id y10mr14822980ioq.140.1624293387629; Mon, 21 Jun 2021 09:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293387; cv=none; d=google.com; s=arc-20160816; b=0yURJzHLHmvzrzSzCTTNOQXIFywID971MP2qF7iDVkJOjtILXFolsgfXZgfAoTbQfg ILiE98xogHbpP0nEh0uPgCrRBpvtKdVgquutYN5M6CGfUBIodaviihJF1cxibXF9+dCB aKUv0a5+fV2JeRRO716yrXg2c7yUQwqX6vkOnNh2WY/GEWfv7KAR3sbpUKdYhqmojl6Y bS/iqSwLssRXPQ9pP4sEXkP9h/H2qcIziaP7XBQfCo5H00NocBVerkq2hCU8PnUTGkKR 8v8h6yHFbDVj4ui9jS8WAprs5u0H3kXuhIbc6muy3Ks5GS5UAahWp0Xd+XGWHO7Ymuds HNFg== 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=LtF1V7sAeU9BA8VXVLsK8QKNHnr8eKh+0umQAwoLRkM=; b=AyO9oCq17sUWpKbsbklO6XYhnd+AxZY3l2TNWZrIDtG3PDzr0CqRTYdZjgWK6UUbq/ 5Dh1BBn4TKv+akWjWqlZDj1lCwUVQJNSdPSexxYrvAETFjNQMT6UZlGhZWZq31gtdJG4 bR/G5OdwXIK5IM8bddl1dPBRasxFGBXYPC4FqhURo/z2ltRSTX3cA7BUoXFCDJ6LiL3x GHBVTkv7LGeV1faRqn+vadHINkHwA82Tz0aZdgVKe3aKeH+cTuxW/DrGtyCGvgXPb2p0 B0UybDVd2Mu6hdgyB7PNa9K9bgOoxRUJ0SfXqlUQgAtX/IL7qtfIqIQ0tTaCeLWI7a/h Bo2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="09/Go/k6"; 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 l1si12755926ilk.81.2021.06.21.09.36.15; Mon, 21 Jun 2021 09:36:27 -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="09/Go/k6"; 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 S231875AbhFUQhD (ORCPT + 99 others); Mon, 21 Jun 2021 12:37:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:53734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232115AbhFUQdK (ORCPT ); Mon, 21 Jun 2021 12:33:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52973613C9; Mon, 21 Jun 2021 16:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292775; bh=87spd6geNl/EK4z+SKlAsHS8LU4hSHAv+QPgTth09f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=09/Go/k6HT4O61hsD23JfuHldUGLWdtI3kokc03jsfRa8398yXMPxxPkFu0fd8UTT 4sVTWirk+EkmadxJLWmPRl8FuggDL00fom2uzdINB91tjQS1DixNxeo/45KKwwX26o vnMNHktPLG09bAVDGVylqLTxD88ZcnZdoitwFhDk= 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.10 126/146] dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc Date: Mon, 21 Jun 2021 18:15:56 +0200 Message-Id: <20210621154919.421145801@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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 @@ -2696,13 +2696,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, @@ -2712,7 +2714,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; }