[igt-dev] [PATCH i-g-t] tests/gem_mmap_offset: Fix invalid munmap in api_intel_bb

From: Zbigniew Kempczyński <hidden>
Date: 2021-03-23 18:13:12
Subsystem: the rest · Maintainer: Linus Torvalds

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.

Signed-off-by: Zbigniew Kempczyński <redacted>
Cc: Petri Latvala <redacted>
Cc: Chris Wilson <redacted>
---
 tests/i915/api_intel_bb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index cc1d1be6e..9115d3f8f 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -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;
 }
-- 
2.26.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help