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

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Mar 23 18:03:47 UTC 2021


Fix nasty bug which leads to SIGSEGV in blt-coherency test.
Instead of pointer unmap was done on intel_buf what was wrong.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/gem_mmap_offset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
index 8b29d0a0a..de927e32e 100644
--- a/tests/i915/gem_mmap_offset.c
+++ b/tests/i915/gem_mmap_offset.c
@@ -591,7 +591,7 @@ static struct intel_buf *create_bo(struct buf_ops *bops, uint32_t value,
 	for (int i = 0; i < 64 / sizeof(*v); i++)
 		v[i] = value;
 
-	munmap(buf, size);
+	munmap(v, size);
 
 	return buf;
 }
-- 
2.26.0



More information about the igt-dev mailing list