From a16ed2560ab738b5eea30f042a36192c5b065b10 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 2 Feb 2023 04:21:45 +0000 Subject: [PATCH] drm/i915: Fix a memory leak with reused mmap_offset From Nirmoy Das 0bdc4b4ba7206c452ee81c82fa66e39d0e1780fb in linux-6.1.y/6.1.9 0220e4fe178c3390eb0291cdb34912d66972db8a in mainline linux --- sys/dev/pci/drm/i915/gem/i915_gem_mman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c index 3a462571b13..bae805b65bd 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c @@ -1038,7 +1038,7 @@ insert: GEM_BUG_ON(lookup_mmo(obj, mmap_type) != mmo); out: if (file) - drm_vma_node_allow(&mmo->vma_node, file); + drm_vma_node_allow_once(&mmo->vma_node, file); return mmo; err: -- 2.20.1