diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-07-05 10:41:58 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-07-05 10:41:58 +0000 |
commit | d4241cba11eb7d920ccbd83d2d5c91514f97f8c4 (patch) | |
tree | 2fb39174475b6451ab5bdcf6d88972c4e8e86f47 /sys | |
parent | 01145d8a599a1320d8a9d5d97e2a5105d7f69478 (diff) |
drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
From Min Li
1af1cd7be370b08694d8752c97325fe51fdab6aa in linux-6.1.y/6.1.36
982b173a6c6d9472730c3116051977e05d17c8c5 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_gem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_gem.c b/sys/dev/pci/drm/radeon/radeon_gem.c index 2b87603671d..f6e6f496d01 100644 --- a/sys/dev/pci/drm/radeon/radeon_gem.c +++ b/sys/dev/pci/drm/radeon/radeon_gem.c @@ -552,7 +552,6 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data, struct radeon_device *rdev = dev->dev_private; struct drm_radeon_gem_set_domain *args = data; struct drm_gem_object *gobj; - struct radeon_bo *robj; int r; /* for now if someone requests domain CPU - @@ -565,13 +564,12 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data, up_read(&rdev->exclusive_lock); return -ENOENT; } - robj = gem_to_radeon_bo(gobj); r = radeon_gem_set_domain(gobj, args->read_domains, args->write_domain); drm_gem_object_put(gobj); up_read(&rdev->exclusive_lock); - r = radeon_gem_handle_lockup(robj->rdev, r); + r = radeon_gem_handle_lockup(rdev, r); return r; } |