Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/api_intel_bb: Correct size for munmap
@ 2022-02-02  6:25 Zbigniew Kempczyński
  2022-02-02  7:10 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/api_intel_bb: Correct size for munmap (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zbigniew Kempczyński @ 2022-02-02  6:25 UTC (permalink / raw)
  To: igt-dev

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 <chris.p.wilson@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 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 5c996f644..e37472fb4 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);
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] i915/api_intel_bb: Correct size for munmap
@ 2022-01-31 16:48 Zbigniew Kempczyński
  2022-02-01 21:53 ` Dixit, Ashutosh
  0 siblings, 1 reply; 7+ messages in thread
From: Zbigniew Kempczyński @ 2022-01-31 16:48 UTC (permalink / raw)
  To: igt-dev

If we don't release the entirety of the mmap we create, it still holds a
reference to the fd/object.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 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 5c996f644..130fb9014 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_bo_size(buf));
 
 	intel_buf_destroy(buf);
 	intel_bb_destroy(ibb);
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-02 16:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-02  6:25 [igt-dev] [PATCH i-g-t] i915/api_intel_bb: Correct size for munmap Zbigniew Kempczyński
2022-02-02  7:10 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/api_intel_bb: Correct size for munmap (rev3) Patchwork
2022-02-02  8:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-02-02 16:08 ` [igt-dev] [PATCH i-g-t] i915/api_intel_bb: Correct size for munmap Dixit, Ashutosh
  -- strict thread matches above, loose matches on Subject: below --
2022-01-31 16:48 Zbigniew Kempczyński
2022-02-01 21:53 ` Dixit, Ashutosh
2022-02-02  6:21   ` Zbigniew Kempczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox