From: FelixCuioc <FelixCui-oc@zhaoxin.com>
To: Joerg Roedel <joro@8bytes.org>,
<iommu@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
"Lu Baolu" <baolu.lu@linux.intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>, <kbuild@lists.01.org>
Cc: TonyWWang-oc@zhaoxin.com, kbuild-all@lists.01.org,
CobeChen-oc@zhaoxin.com
Subject: [PATCH 3/3] iommu/vt-d:Add mutex_unlock() before returning
Date: Wed, 26 Aug 2020 06:27:52 -0400 [thread overview]
Message-ID: <20200826102752.3776-4-FelixCui-oc@zhaoxin.com> (raw)
In-Reply-To: <20200826102752.3776-1-FelixCui-oc@zhaoxin.com>
In the probe_acpi_namespace_devices function,when the physical
node of the acpi device is NULL,the unlock function is missing.
Add mutex_unlock(&adev->physical_node_lock).
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: FelixCuioc <FelixCui-oc@zhaoxin.com>
---
drivers/iommu/intel/iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index b31f02f41c96..25e9853cba1b 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4851,6 +4851,7 @@ static int __init probe_acpi_namespace_devices(void)
if (pn_dev == NULL) {
dev->bus->iommu_ops = &intel_iommu_ops;
ret = iommu_probe_device(dev);
+ mutex_unlock(&adev->physical_node_lock);
if (ret) {
pr_err("acpi_device probe fail! ret:%d\n", ret);
return ret;
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-08-26 10:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 10:27 [PATCH v2 0/3] Add support for ACPI device in RMRR to access reserved memory FelixCuioc
2020-08-26 10:27 ` [PATCH 1/3] iommu/vt-d:Add support for detecting ACPI device in RMRR FelixCuioc
2020-08-26 10:54 ` Dan Carpenter
2020-08-26 10:27 ` [PATCH 2/3] iommu/vt-d:Add support for probing " FelixCuioc
2020-08-26 10:58 ` Dan Carpenter
2020-08-26 10:27 ` FelixCuioc [this message]
2020-08-26 10:59 ` [PATCH 3/3] iommu/vt-d:Add mutex_unlock() before returning Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200826102752.3776-4-FelixCui-oc@zhaoxin.com \
--to=felixcui-oc@zhaoxin.com \
--cc=CobeChen-oc@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=baolu.lu@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).