Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_vm: fix double munmap of first mapping
@ 2026-08-31 16:29 nishit.sharma
  2026-08-31 17:12 ` Kamil Konieczny
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: nishit.sharma @ 2026-08-31 16:29 UTC (permalink / raw)
  To: igt-dev, kamil.konieczny

From: Nishit Sharma <nishit.sharma@intel.com>

In the cleanup path of the bind-array conflict test, when a second buffer
object mapping (map2) exists, the code called munmap() on the first
mapping (map) a second time instead of unmapping map2:

This double-unmaps the map region while leaking the map2 mapping entirely.

Signed-off-by: Nishit Sharma <nishit.sharma@intel.com>
---
 tests/intel/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index 1d109e783..a0a6616c3 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1278,7 +1278,7 @@ test_bind_array_conflict(int fd, struct drm_xe_engine_class_instance *eci,
 
 	munmap(map, bo_size);
 	if (map2)
-		munmap(map, bo_size);
+		munmap(map2, bo_size);
 	gem_close(fd, bo);
 	if (bo2)
 		gem_close(fd, bo2);
-- 
2.43.0


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

end of thread, other threads:[~2026-09-01 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 16:29 [PATCH] tests/intel/xe_vm: fix double munmap of first mapping nishit.sharma
2026-08-31 17:12 ` Kamil Konieczny
2026-09-01 12:35 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-09-01 12:38 ` ✓ i915.CI.BAT: " Patchwork
2026-09-01 13:53 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-01 15:03 ` ✓ i915.CI.Full: " Patchwork

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