Skip to content

Commit 2e86e38

Browse files
JuliaLawallgregkh
authored andcommitted
iommu/virtio: Reverse arguments to list_add
commit fb3637a 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: 2a5a314 ("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>
1 parent 1a31c44 commit 2e86e38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/virtio-iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
454454
if (!region)
455455
return -ENOMEM;
456456

457-
list_add(&vdev->resv_regions, &region->list);
457+
list_add(&region->list, &vdev->resv_regions);
458458
return 0;
459459
}
460460

0 commit comments

Comments
 (0)