aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorJeremy Cline <[email protected]>2020-12-02 19:02:20 -0500
committerMaarten Lankhorst <[email protected]>2021-10-06 11:12:29 +0200
commitbcf34aa5082ee2343574bc3f4d1c126030913e54 (patch)
treeb9cced79945c926d9907481edae51fbdd4c595df /scripts/gdb/linux/utils.py
parentb67929808fe46d67cc9357b0112e4549076db4c5 (diff)
drm/nouveau: avoid a use-after-free when BO init fails
nouveau_bo_init() is backed by ttm_bo_init() and ferries its return code back to the caller. On failures, ttm_bo_init() invokes the provided destructor which should de-initialize and free the memory. Thus, when nouveau_bo_init() returns an error the gem object has already been released and the memory freed by nouveau_bo_del_ttm(). Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object") Cc: Thierry Reding <[email protected]> Signed-off-by: Jeremy Cline <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions