aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2019-01-29 10:02:33 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2019-01-29 15:48:38 +0000
commit9791ec7df0e7b4d80706ccea8f24b6542f6059e9 (patch)
tree365a8cbf62ff76eef093c14c126420f38eb65a6b /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parent6479450f72c1391c03f08affe0d0110f41ae7ca0 (diff)
irqchip/gic-v3-its: Plug allocation race for devices sharing a DevID
On systems or VMs where multiple devices share a single DevID (because they sit behind a PCI bridge, or because the HW is broken in funky ways), we reuse the save its_device structure in order to reflect this. It turns out that there is a distinct lack of locking when looking up the its_device, and two device being probed concurrently can result in double allocations. That's obviously not nice. A solution for this is to have a per-ITS mutex that serializes device allocation. A similar issue exists on the freeing side, which can run concurrently with the allocation. On top of now taking the appropriate lock, we also make sure that a shared device is never freed, as we have no way to currently track the life cycle of such object. Reported-by: Zheng Xiang <zhengxiang9@huawei.com> Tested-by: Zheng Xiang <zhengxiang9@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions