dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix reference count leak in xe_pci_barrier_mmap()
@ 2026-07-09 12:32 yaolu
  2026-07-09 12:40 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: yaolu @ 2026-07-09 12:32 UTC (permalink / raw)
  To: matthew.brost, thomas.hellstrom, rodrigo.vivi
  Cc: intel-xe, dri-devel, linux-kernel, Lu Yao

From: Lu Yao <yaolu@kylinos.cn>

xe_pci_barrier_mmap() function called drm_dev_get() when setting up
the VMA, but never released. The vm_ops .open/.close callbacks
already handle reference counting correctly.

Fixes: 75d37750a753 ("drm/xe/mmap: Add mmap support for PCI memory barrier")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
 drivers/gpu/drm/xe/xe_device.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index abe25aedeead..3b5a2fad697f 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -340,7 +340,6 @@ static int xe_pci_barrier_mmap(struct file *filp,
 	vm_flags_set(vma, VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO);
 	vma->vm_ops = &vm_ops_barrier;
 	vma->vm_private_data = dev;
-	drm_dev_get(vma->vm_private_data);
 
 	return 0;
 }
-- 
2.25.1


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

end of thread, other threads:[~2026-07-09 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 12:32 [PATCH] drm/xe: Fix reference count leak in xe_pci_barrier_mmap() yaolu
2026-07-09 12:40 ` sashiko-bot

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