drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
authorMin Li <lm0963hack@gmail.com>
Sat, 3 Jun 2023 07:43:45 +0000 (15:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Jun 2023 21:00:20 +0000 (17:00 -0400)
commit982b173a6c6d9472730c3116051977e05d17c8c5
treec199ca9cbdd28bc6915777a5062e5f85b4d209a7
parent73c12de8bee258b51bd418f33dc59f2c6e5fb5f6
drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl

Userspace can race to free the gobj(robj converted from), robj should not
be accessed again after drm_gem_object_put, otherwith it will result in
use-after-free.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Min Li <lm0963hack@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_gem.c