From: jsg Date: Thu, 4 Apr 2024 07:43:15 +0000 (+0000) Subject: drm/i915: Check before removing mm notifier X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=292e95c81ddfadb2fb6166a885be02b8e22e1e56;p=openbsd drm/i915: Check before removing mm notifier From Nirmoy Das a30c36bc0cfc32ec3662408e6a5cdf8a809fde51 in linux-6.6.y/6.6.24 01bb1ae35006e473138c90711bad1a6b614a1823 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_userptr.c b/sys/dev/pci/drm/i915/gem/i915_gem_userptr.c index 505ff3071bc..94deec64b13 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_userptr.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_userptr.c @@ -379,6 +379,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; }