blob: fadd0d73968bb8fbbe5c6e49a41a6fa8422f1f83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 500bf0198a7cdfc9dc2b854715728ce74944cfec Mon Sep 17 00:00:00 2001
From: Valentine Barshak <valentine.barshak@cogentembedded.com>
Date: Tue, 25 Jun 2019 22:43:44 +0300
Subject: [PATCH 104/211] iommu: ipmmu-vmsa: Fix NULL pointer dereference
This fixes possible NULL pointer dereference
in case no whitelist is initialized.
Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
drivers/iommu/ipmmu-vmsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index 4a3055f..cdbfc53 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1485,7 +1485,7 @@ static int ipmmu_whitelist_init(struct ipmmu_vmsa_device *mmu)
else
mmu->whitelist = NULL;
- if (!mmu->whitelist[0])
+ if (!mmu->whitelist)
return -1;
return ipmmu_bm_init(mmu);
--
2.7.4
|