Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3303376pxk; Mon, 21 Sep 2020 10:07:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP0TWAavRuSCz5ThKptrXX+fvLUnmytaPiDsXDbiThh6WrmuHtZVxOUJbb/hlwUFhrBpfJ X-Received: by 2002:a17:906:4755:: with SMTP id j21mr467649ejs.228.1600708027468; Mon, 21 Sep 2020 10:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600708027; cv=none; d=google.com; s=arc-20160816; b=ymhSiF4Q9N2ix5jH5PHqy+5Q+sko4hdIpMFA/OGLhI2myVuQlPxeCQmj+3QWznLQ9F ZqByre6b/74/b6nLjaDqhhrL78UpbcFRTwMo5TPvOIbHjhQ/7Ye2v1t+SvX3aOCYJb+b BWiEHl5YAFBtlc9k9i+izPhr27+aNqX46/x6+okeiCfVIugGpGHecLvkRt8UqRgSKplb JmTK8MGnkPshoi52/gvK9fNbt+hrBK/WWDPkphvIa8mK7XxrSfhzzFQF9XcJD1WjY9Ja OlJIbS0C2JT51CztzGdiHuRq06PaEcLrtb0GjK7VM2QBoSQXN1j3wi8cRQobpIXon3rE anJg== 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=Ceg7BGLhRjmPVN4EcijbfcHOqU9cDsjF0j22JhVengc=; b=gX/he4Ti+1/98KOp5oHlC0+furwsCKwhu2XTkSpw4AYnokZP+BN6Elcb9vmdh19dba 9GqomaMVb5Ez/g30LKUJmhCG8KiId42Nh+0plmjoivnqEDiQv2sqjADBg4haXxbMKjn8 WRbuD36qL8IeLWDqbT5ghFIBfHIalWItjduaxSzr6m8iRAFW/ISwh14UB79DHjRN4nTz XC4Mi4pHj7bChQMvqvwLPTe5OXQBhDUoA47pDa233AH0mDLpURPWrfpv/tvYMLUwPU62 AmebVATA7rDV9mh6eqsIQX/TSDyu9DVLOHDwj/xdEcueDfDZIyrCgl8mxohetNec5jfZ yXkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="vJsIbk/J"; 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=fail (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 d21si9257472edp.276.2020.09.21.10.06.44; Mon, 21 Sep 2020 10:07:07 -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=default header.b="vJsIbk/J"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727269AbgIURDp (ORCPT + 99 others); Mon, 21 Sep 2020 13:03:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728476AbgIUQgt (ORCPT ); Mon, 21 Sep 2020 12:36:49 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 004CE206B7; Mon, 21 Sep 2020 16:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706209; bh=3st5nF5UcQ80yr/lcX3pOnZPlbiq4npcK9jsNL3vzmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vJsIbk/J+7BwxZGL0zEG1mhECRWPPSPfq7hhuIA31i2rTCXUs9Mz3CjbFXcjjhH2w ga9WHQmt2ooK5jrviGcR+pEnGj0tptqKPlLgIcsuJEz/lzxZ81FQ7I4cGNJWELpPlF ekpTnfC37qAzjo9AnJ3PDCCaV5ZXXuejP6ULdtSU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hanjun Guo , Vinod Koul , Sasha Levin Subject: [PATCH 4.14 10/94] dmaengine: acpi: Put the CSRT table after using it Date: Mon, 21 Sep 2020 18:26:57 +0200 Message-Id: <20200921162036.019702560@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@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: Hanjun Guo [ Upstream commit 7eb48dd094de5fe0e216b550e73aa85257903973 ] The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping, put the CSRT table buf after using it. Signed-off-by: Hanjun Guo Link: https://lore.kernel.org/r/1595411661-15936-1-git-send-email-guohanjun@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/acpi-dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c index 4a748c3435d7d..8d99c84361cbb 100644 --- a/drivers/dma/acpi-dma.c +++ b/drivers/dma/acpi-dma.c @@ -131,11 +131,13 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma) if (ret < 0) { dev_warn(&adev->dev, "error in parsing resource group\n"); - return; + break; } grp = (struct acpi_csrt_group *)((void *)grp + grp->length); } + + acpi_put_table((struct acpi_table_header *)csrt); } /** -- 2.25.1