Skip to contentSkip to conversation

Suspend broken on Thinkpad x201s since 4.7-rc1

PATCH Superseded Jan Niehusmann 1 participant 2 messages Jun 2, 2016 – Jun 3, 2016 IOMMU

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

Hi,

when trying out 4.7-rc1 on my Thinkpad x201s, I noticed that suspending the system doesn't work any more. Instead, when trying to suspend, the system hangs with a black screen and the suspend-LED blinking.

I bisected the issue to commit 22e2f9fa63b092923873fc8a52955151f4d83274, and indeed, reverting this commit from 4.7-rc1 fixes the issue.

As the system just hangs on suspend, I don't have any error message to quote. But if there is something I could try to get some diagnostics, please let me know.

Jan

#1 lore raw

PATCH 1/1 iommu/vt-d: fix overflow of iommu->domains array

The valid range of did in get_iommu_domain(*iommu, did) is 0..cap_ndoms(iommu->cap), so don't exceed that range in free_all_cpu_cached_iovas().

---
 drivers/iommu/intel-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel-iommu.c +1 -1
index a644d0c..82989d4 100644
@@ -4600,7 +4600,7 @@ static void free_all_cpu_cached_iovas(unsigned int cpu)
 		if (!iommu)
 			continue;
 
-		for (did = 0; did < 0xffff; did++) {
+		for (did = 0; did < cap_ndoms(iommu->cap); did++) {
 			domain = get_iommu_domain(iommu, did);
 
 			if (!domain)
Signature · 1 line
2.1.4