[igt-dev] [PATCH i-g-t] tests/gem_mmap_offset: Fix invalid munmap in api_intel_bb
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Mar 23 18:13:01 UTC 2021
Fix bug which leads to SIGSEGV in api_intel_bb at render-ccs 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/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
More information about the igt-dev
mailing list