Re: [Nouveau] [PATCH] drm/nouveau/svm: Fix refcount leak bug and missing check against null bug

2021-10-05 Thread Karol Herbst
I think it makes sense to add a Fixes tag to this: Fixes: 822cab6150d3 ("drm/nouveau/svm: check for SVM initialized before migrating") Reviewed-by: Karol Herbst On Tue, Sep 7, 2021 at 3:20 PM Chenyuan Mi wrote: > > The reference counting issue happens in one exception handling path of > nouveau

[Nouveau] [PATCH] drm/nouveau/svm: Fix refcount leak bug and missing check against null bug

2021-09-10 Thread Chenyuan Mi
The reference counting issue happens in one exception handling path of nouveau_svmm_bind(). When cli->svm.svmm is null, the function forgets to decrease the refcount of mm increased by get_task_mm(), causing a refcount leak. Fix this issue by using mmput() to decrease the refcount in the exception