Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574486 > unrolled thread
| Started by | Eric Auger <eric.auger@redhat.com> |
|---|---|
| First post | 2017-02-06 10:20 +0100 |
| Last post | 2017-02-06 14:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions Eric Auger <eric.auger@redhat.com> - 2017-02-06 10:20 +0100
Re: [PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions Joerg Roedel <joro@8bytes.org> - 2017-02-06 14:10 +0100
| From | Eric Auger <eric.auger@redhat.com> |
|---|---|
| Date | 2017-02-06 10:20 +0100 |
| Subject | [PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions |
| Message-ID | <t7NCO-33M-19@gated-at.bofh.it> |
In case the device reserved region list is void, the returned value
of iommu_insert_device_resv_regions is uninitialized. Let's return 0
in that case.
This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions").
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
Applies on top of iommu-next
---
drivers/iommu/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index b752c3d..f5c9279 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -205,7 +205,7 @@ iommu_insert_device_resv_regions(struct list_head *dev_resv_regions,
struct list_head *group_resv_regions)
{
struct iommu_resv_region *entry;
- int ret;
+ int ret = 0;
list_for_each_entry(entry, dev_resv_regions, list) {
ret = iommu_insert_resv_region(entry, group_resv_regions);
--
2.5.5
[toc] | [next] | [standalone]
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Date | 2017-02-06 14:10 +0100 |
| Subject | Re: [PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions |
| Message-ID | <t7Rdn-5m6-7@gated-at.bofh.it> |
| In reply to | #1574486 |
On Mon, Feb 06, 2017 at 10:11:38AM +0100, Eric Auger wrote:
> In case the device reserved region list is void, the returned value
> of iommu_insert_device_resv_regions is uninitialized. Let's return 0
> in that case.
>
> This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions").
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web