[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] amd/iommu: fix missing unlock in iommu_read_log



commit a42a466c0098decec8bd255ccb1a384ea878ec08
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Wed Feb 19 12:19:04 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Feb 19 11:59:39 2020 +0000

    amd/iommu: fix missing unlock in iommu_read_log
    
    Coverity-ID: 1458632
    Fixes: 709d3ddea2d5e ('AMD/IOMMU: Common the #732/#733 errata handling in 
iommu_read_log()')
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/passthrough/amd/iommu_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/amd/iommu_init.c 
b/xen/drivers/passthrough/amd/iommu_init.c
index 4c86848c52..d9a4b0f802 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -338,7 +338,7 @@ static int iommu_read_log(struct amd_iommu *iommu,
             {
                 AMD_IOMMU_DEBUG("AMD-Vi: No entry written to %s Log\n",
                                 log == &iommu->event_log ? "Event" : "PPR");
-                return 0;
+                goto out;
             }
             udelay(1);
             code = MASK_EXTR(ACCESS_ONCE(entry[1]), IOMMU_EVENT_CODE_MASK);
@@ -357,6 +357,7 @@ static int iommu_read_log(struct amd_iommu *iommu,
         writel(log->head, iommu->mmio_base + head_offset);
     }
 
+ out:
     spin_unlock(&log->lock);
    
     return 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.