1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

drm/amdgpu: fix lock leak on ENOMEM in AMDGPU_GEM_OP_GET_MAPPING_INFO

From Michael Bommarito
1eb86334e391695d4a40743b114afc15df4dc506 in linux-6.18.y/6.18.35
2e7f55eb408c3f72ee1957a0d0ad11d8648a6379 in mainline linux
This commit is contained in:
jsg
2026-06-10 00:17:13 +00:00
parent 9a2cd901ba
commit 645d03bff1
+4 -2
View File
@@ -1195,8 +1195,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
* be retried.
*/
vm_entries = kvcalloc(args->num_entries, sizeof(*vm_entries), GFP_KERNEL);
if (!vm_entries)
return -ENOMEM;
if (!vm_entries) {
r = -ENOMEM;
goto out_exec;
}
amdgpu_vm_bo_va_for_each_valid_mapping(bo_va, mapping) {
if (num_mappings < args->num_entries) {