Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2661703pxa; Mon, 17 Aug 2020 15:51:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxit7TIFeavsnrF5nBgh4pWzuQNXHm5zlwIfmdy406z9ZF8uVBXY+VS4vwNtFP/uSADLsB X-Received: by 2002:aa7:c1d4:: with SMTP id d20mr17229738edp.81.1597704712251; Mon, 17 Aug 2020 15:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704712; cv=none; d=google.com; s=arc-20160816; b=nzu2FFCMCaMyodpFDiPnd+D4gJNbdqU6Ie+3GJTU7XF+3NinoKqzfYjGcr8HcVmEnr CeAWnAXzzQSvW7YoZS8Ij3YQ8VPM8IVlMa5gCLd8n98vUxGVqiEId0/4NgDZ+cEdSbiW s2yceHWP9ZpY2ICvF5ZC4DlUnuIVebZ0lnCzseKHvWtggQYQqOEFD0LwGKCqiKaVeoP9 g0tVlLRYpBPJudAvAaM65cFIlaLv6JNcD72hN2It8NzaUBPR8BOvGTf6Kt5nlPbmgdub tK1oPUSMnx75VrD1bVRyjz207brACyg4iX+aCMdL0ab/khMBtnA9af8PjxLj6qYUhgtN JOFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/hOpjm5b9gqRRT7gSApupkaudXRI5NTxVsSm9NBUCDU=; b=L8ykDi8+TeKVlh9aq1iUazE5F5d+zayJJug5AS0sK8gf6buwJESStLMywHvzKg9DYs XwQHeUu8SAK/5Rx/DuQUI64yEh9pb5DW2iKPnLDJF1nQkJOsnywtz7cFwIFdZu/8ZdtB vQhOKvVDG08mtVOWQs3JbgO2sqA3lYlbDb9TNwAecOrpt2PIx39pdiirTF7pf0lZ0ffK jQTj47EEgmzw1zJVoN9tkLLdyk2v03QaX/p8NyCVSMHn1FS8b+vEWWHcT+g7A/WTalNX ghRx5Pq3Pw7Ej5Yqj44BudSjyJFShD73qbA3VujsZhm9c8/TT5xba9Uzb54XTDUuLUey z8+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vg8Lgph2; 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 lw1si12014707ejb.226.2020.08.17.15.51.29; Mon, 17 Aug 2020 15:51:52 -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=vg8Lgph2; 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 S2392188AbgHQTXm (ORCPT + 99 others); Mon, 17 Aug 2020 15:23:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:38918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730116AbgHQPe5 (ORCPT ); Mon, 17 Aug 2020 11:34:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 18A1823434; Mon, 17 Aug 2020 15:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678497; bh=nY7Z+58bxMpqeEY+egYViKeihsa18A5ZvgjKv7qVcAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vg8Lgph2zzaTLFM+4gdil9wAU9TZOwXyI5JvPOsGGqjLjXYCFMqTem4rk/7J10h2V BhGApiiq7k1DoXrtpYqzZEvPVw9MvaHUN3g/4l3/giQwSmFm7+bTYtELDAOEh8WRFk dX5MACFzBqShm6yl43zHMSqwh4PSNr5NksvZRzmg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hanjun Guo , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.8 323/464] PCI: Release IVRS table in AMD ACS quirk Date: Mon, 17 Aug 2020 17:14:36 +0200 Message-Id: <20200817143849.265318404@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hanjun Guo [ Upstream commit 090688fa4e448284aaa16136372397d7d10814db ] 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. In pci_quirk_amd_sb_acs(), IVRS table is just used for checking AMD IOMMU is supported, not used at runtime, so put the table after using it. Fixes: 15b100dfd1c9 ("PCI: Claim ACS support for AMD southbridge devices") Link: https://lore.kernel.org/r/1595411068-15440-1-git-send-email-guohanjun@huawei.com Signed-off-by: Hanjun Guo Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 2ea61abd58302..d442219cd2708 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4422,6 +4422,8 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags) if (ACPI_FAILURE(status)) return -ENODEV; + acpi_put_table(header); + /* Filter out flags not applicable to multifunction */ acs_flags &= (PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_EC | PCI_ACS_DT); -- 2.25.1