Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3941404pxj; Mon, 21 Jun 2021 09:50:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcJS2V3TzGm3be0D+sfj1wMoE3/2BF6mskzYGC2ICVJViZVgE9HftzMAPsHHGsCPeQP7ne X-Received: by 2002:a92:d448:: with SMTP id r8mr17355939ilm.109.1624294255459; Mon, 21 Jun 2021 09:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294255; cv=none; d=google.com; s=arc-20160816; b=RUzjtj0pp/bhQmxxO5qLKqRTTfxS4iBAQshRJ2XMHoKyjCDHAWUgG0Mh2TjDxEv6cp U0oRuYBHDaViPxcWV8RCtAEbSbgutaPoL+xjScMvFC1sGfckOovNd0+hXbVUW7vcEkgX abdR2jwKaUxlc/j9rN5RL4i1L0whAs/p9U435l2HcbPxg/VPY6SkYyg3zkO1ZAwzH1kY frz5bE2loVTALCaqeyqCK1AKnnDbF551gTPQZE6n7DKP6ovXDW9fibrsXmNdGGmOHQoH WsnRNVpFStowBsw8/XKUsciLnwJi+FjQ3Jw7lUTNpPx6e/K0MkULpwuY8Tw1+yXPJ227 RuFw== 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=Etgvws74u4cPiXyQCvUZiO15uyvOe+1F41x5GamF5Oc=; b=miJJ0Ya0Fh0Oet+qq1rNQFD2UBPY9fESmdVGKAYrlyixdlHvzAEY3BnhYwi4Cxi88m vLUtqj3M6IOCu1ghFUr9Y3DNKuRXN73PavOtIiE30bF4DouZw2XPb3psjdl+9oMzXHac fZLNt4XsobQoSCnkxM88ztkpt65w0tTA247+iXz+dVNxvjOX19q/Lklwn3IcFG6q6FTv VkxrcjnyhtTjun61gZx96Z2cy3k/AzMzYXQAspfUE9uLjwW6Fk5JW/MqqxMV9h+znKwM V/x32qFN+geLBiSArMVGe4y2GJMvWxJysQEzXHLXffKTSjAYaULCsm6zKULxpJqC4yGy tmQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P+pogUOL; 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 d64si18869361iof.89.2021.06.21.09.50.43; Mon, 21 Jun 2021 09:50:55 -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=P+pogUOL; 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 S232760AbhFUQw3 (ORCPT + 99 others); Mon, 21 Jun 2021 12:52:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232761AbhFUQsB (ORCPT ); Mon, 21 Jun 2021 12:48:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A2C361458; Mon, 21 Jun 2021 16:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293240; bh=AlgjhKd+Dnlkxs65AqMCoedbfkv/5rXTQeyFulhIvSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P+pogUOLIdNiBS+F1wNW44mxzBDl6E76NU0QoajVctDIzYs0zNBSnW1DkYhogzxaq bm/GMCqPRj+Vq3OVNn1907COhg5Rk7GeywY44hMreHre2f248mko9y6zwGrBsaHCeU yLdHcRZ2MU5Au6Y7/pF+zwXZY7a+gkE0ArZxWrTk= 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.12 150/178] dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc Date: Mon, 21 Jun 2021 18:16:04 +0200 Message-Id: <20210621154927.870951565@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 @@ -2694,13 +2694,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, @@ -2710,7 +2712,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; }