Re: [PATCH] drm/i915: check before removing mm notifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 27/02/2024 09:26, Nirmoy Das wrote:
Hi Tvrtko,

On 2/27/2024 10:04 AM, Tvrtko Ursulin wrote:

On 21/02/2024 11:52, Nirmoy Das wrote:
Merged it to drm-intel-gt-next with s/check/Check

Shouldn't this have had:

Fixes: ed29c2691188 ("drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v7.")
Cc: <stable@xxxxxxxxxxxxxxx> # v5.13+

?

Yes. Sorry, I missed that. Can we still the tag ?

I've added them and force pushed the branch since commit was still at the top.

FYI + Jani, Joonas and Rodrigo

Regards,

Tvrtko



Thanks,

Nirmoy

Regards,

Tvrtko

On 2/19/2024 1:50 PM, Nirmoy Das wrote:
Error in mmu_interval_notifier_insert() can leave a NULL
notifier.mm pointer. Catch that and return early.

Cc: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
Cc: Shawn Lee <shawn.c.lee@xxxxxxxxx>
Signed-off-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>
---
  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;
  }



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux