Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panthor: Lock XArray when getting entries for the VM

Similar to commit cac075706f29 ("drm/panthor: Fix race when converting
group handle to group object") we need to use the XArray's internal
locking when retrieving a vm pointer from there.

v2: Removed part of the patch that was trying to protect fetching
the heap pointer from XArray, as that operation is protected by
the @pool->lock.

Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block")
Reported-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241106185806.389089-1-liviu.dudau@arm.com

authored by

Liviu Dudau and committed by
Steven Price
444fa5b1 052ef642

+2
+2
drivers/gpu/drm/panthor/panthor_mmu.c
··· 1580 1580 { 1581 1581 struct panthor_vm *vm; 1582 1582 1583 + xa_lock(&pool->xa); 1583 1584 vm = panthor_vm_get(xa_load(&pool->xa, handle)); 1585 + xa_unlock(&pool->xa); 1584 1586 1585 1587 return vm; 1586 1588 }