summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@inria.fr>2020-05-05 20:47:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-14 07:58:29 +0200
commit2e86e3841c3c0777b15f5c710600677c189db482 (patch)
treebb6b609dffe96c4b1dafb4e97bcbf583782429d2 /drivers/iommu
parent1a31c4456af924341c6c070880a82d52d13500f5 (diff)
downloadlinux-2e86e3841c3c0777b15f5c710600677c189db482.tar.gz
linux-2e86e3841c3c0777b15f5c710600677c189db482.tar.bz2
linux-2e86e3841c3c0777b15f5c710600677c189db482.zip
iommu/virtio: Reverse arguments to list_add
commit fb3637a113349f53830f7d6ca45891b7192cd28f upstream. Elsewhere in the file, there is a list_for_each_entry with &vdev->resv_regions as the second argument, suggesting that &vdev->resv_regions is the list head. So exchange the arguments on the list_add call to put the list head in the second argument. Fixes: 2a5a31487445 ("iommu/virtio: Add probe request") Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Link: https://lore.kernel.org/r/1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/virtio-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 6c340a4f4fd2..60e659a24f90 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -454,7 +454,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
if (!region)
return -ENOMEM;
- list_add(&vdev->resv_regions, &region->list);
+ list_add(&region->list, &vdev->resv_regions);
return 0;
}