aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2023-02-08 13:00:50 -0500
committerZack Rusin <[email protected]>2023-02-14 22:10:01 -0500
commit1a6897921f52ceb2c8665ef826e405bd96385159 (patch)
tree8d654d1618a085429f33ac9dd89e7843449e4ea7 /tools/testing/selftests/bpf/progs/test_autoload.c
parentbb2ff6c27bc9e1da4d3ec5e7b1d6b9df1092cb5a (diff)
drm/vmwgfx: Stop accessing buffer objects which failed init
ttm_bo_init_reserved on failure puts the buffer object back which causes it to be deleted, but kfree was still being called on the same buffer in vmw_bo_create leading to a double free. After the double free the vmw_gem_object_create_with_handle was setting the gem function objects before checking the return status of vmw_bo_create leading to null pointer access. Fix the entire path by relaying on ttm_bo_init_reserved to delete the buffer objects on failure and making sure the return status is checked before setting the gem function objects on the buffer object. Signed-off-by: Zack Rusin <[email protected]> Fixes: 8afa13a0583f ("drm/vmwgfx: Implement DRIVER_GEM") Reviewed-by: Maaz Mombasawala <[email protected]> Reviewed-by: Martin Krastev <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 36d421e632e9a0e8375eaed0143551a34d81a7e3) Cc: <[email protected]> # v5.17+
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions