From f31f9ca3d81440e955e3963f9d91f54fa6c3c09f Mon Sep 17 00:00:00 2001 From: Zbigniew Kempczyński Date: Wed, 2 Feb 2022 07:25:27 +0100 Subject: i915/api_intel_bb: Correct size for munmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we don't release the entirety of the mmap we create, it still holds a reference to the fd/object. v2: changed to intel_buf_size() (ZK) Signed-off-by: Chris Wilson Cc: Zbigniew Kempczyński Reviewed-by: Ashutosh Dixit --- tests/i915/api_intel_bb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/i915/api_intel_bb.c') diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c index 5c996f64..e37472fb 100644 --- a/tests/i915/api_intel_bb.c +++ b/tests/i915/api_intel_bb.c @@ -1169,7 +1169,7 @@ static void delta_check(struct buf_ops *bops) ptr = gem_mmap__device_coherent(i915, buf->handle, 0, intel_buf_size(buf), PROT_READ); val = ptr[0x2000 / sizeof(uint32_t)]; - gem_munmap(ptr, ibb->size); + gem_munmap(ptr, intel_buf_size(buf)); intel_buf_destroy(buf); intel_bb_destroy(ibb); -- cgit v1.2.3