mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/i915: Check before removing mm notifier
Error in mmu_interval_notifier_insert() can leave a NULL notifier.mm pointer. Catch that and return early. Fixes:ed29c26911
("drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v7.") Cc: <stable@vger.kernel.org> # v5.13+ [tursulin: Added Fixes and cc stable.] 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> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240219125047.28906-1-nirmoy.das@intel.com Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (cherry picked from commitdb7bbd13f0
) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
parent
e567857cb4
commit
01bb1ae350
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue