diff options
author | Chenyuan Mi <[email protected]> | 2021-09-07 20:26:33 +0800 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2021-11-04 12:29:07 +0100 |
commit | 6bb8c2d51811eb5e6504f49efe3b089d026009d2 (patch) | |
tree | 397549feef0b9b03ae95b91220d97f07090c4088 /scripts/gdb/linux/utils.py | |
parent | 93f43ed81abec8c805e1b77eb1d20dbc51a24dc4 (diff) |
drm/nouveau/svm: Fix refcount leak bug and missing check against null bug
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 handling path.
Also, the function forgets to do check against null when get mm
by get_task_mm().
Fix this issue by adding null check after get mm by get_task_mm().
Signed-off-by: Chenyuan Mi <[email protected]>
Signed-off-by: Xiyu Yang <[email protected]>
Signed-off-by: Xin Tan <[email protected]>
Fixes: 822cab6150d3 ("drm/nouveau/svm: check for SVM initialized before migrating")
Reviewed-by: Lyude Paul <[email protected]>
Reviewed-by: Ben Skeggs <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/14
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions