Skip to contentSkip to conversation

tests/gem_mmap_offset: Fix invalid munmap in api_intel_bb

PATCH New Zbigniew Kempczyński 1 participant 1 message Mar 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/gem_mmap_offset: Fix invalid munmap in api_intel_bb

Fix bug which leads to SIGSEGV in api_intel_bb@render-ccs test. Instead of pointer unmap was done on intel_buf what was wrong.

---
 tests/i915/api_intel_bb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/i915/api_intel_bb.c +1 -1
index cc1d1be6e..9115d3f8f 100644
@@ -1068,7 +1068,7 @@ static uint32_t count_compressed(int gen, struct intel_buf *buf)
 		if (ptr[buf->ccs[0].offset + i])
 			compressed++;
 
-	munmap(buf, intel_buf_bo_size(buf));
+	munmap(ptr, intel_buf_bo_size(buf));
 
 	return compressed;
 }
Signature · 6 lines
2.26.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev