All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: check before removing mm notifier
@ 2024-02-19 12:50 Nirmoy Das
  2024-02-19 16:44 ` ✓ Fi.CI.BAT: success for drm/i915: check before removing mm notifier (rev2) Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Nirmoy Das @ 2024-02-19 12:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel, Nirmoy Das, Andi Shyti, Shawn Lee

Error in mmu_interval_notifier_insert() can leave a NULL
notifier.mm pointer. Catch that and return early.

Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Shawn Lee <shawn.c.lee@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 0e21ce9d3e5a..61abfb505766 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -349,6 +349,9 @@ i915_gem_userptr_release(struct drm_i915_gem_object *obj)
 {
 	GEM_WARN_ON(obj->userptr.page_ref);
 
+	if (!obj->userptr.notifier.mm)
+		return;
+
 	mmu_interval_notifier_remove(&obj->userptr.notifier);
 	obj->userptr.notifier.mm = NULL;
 }
-- 
2.42.0


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

end of thread, other threads:[~2024-02-28 14:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 12:50 [PATCH] drm/i915: check before removing mm notifier Nirmoy Das
2024-02-19 16:44 ` ✓ Fi.CI.BAT: success for drm/i915: check before removing mm notifier (rev2) Patchwork
2024-02-19 20:12 ` [PATCH] drm/i915: check before removing mm notifier Rodrigo Vivi
2024-02-20  9:05   ` Nirmoy Das
2024-02-19 21:38 ` ✗ Fi.CI.IGT: failure for drm/i915: check before removing mm notifier (rev2) Patchwork
2024-02-20 13:51 ` ✓ Fi.CI.BAT: success for drm/i915: check before removing mm notifier (rev3) Patchwork
2024-02-20 15:04 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-21 11:52 ` [PATCH] drm/i915: check before removing mm notifier Nirmoy Das
2024-02-27  9:04   ` Tvrtko Ursulin
2024-02-27  9:26     ` Nirmoy Das
2024-02-28 13:24       ` Tvrtko Ursulin
2024-02-28 14:14         ` Nirmoy Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.