Commit 1f744005 authored by Lizhi Hou's avatar Lizhi Hou Committed by Mario Limonciello
Browse files

accel/amdxdna: Use rcu_access_pointer for __rcu pointer



Use rcu_access_pointer for pid in struct drm_file. This fixes sparse
warning.

Fixes: be462c97 ("accel/amdxdna: Add hardware context")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412311210.LfeHTzLw-lkp@intel.com/


Signed-off-by: default avatarLizhi Hou <lizhi.hou@amd.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-4-lizhi.hou@amd.com
parent c199310b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
		goto put_rpm;
	}

	client->pid = pid_nr(filp->pid);
	client->pid = pid_nr(rcu_access_pointer(filp->pid));
	client->xdna = xdna;

	client->sva = iommu_sva_bind_device(xdna->ddev.dev, current->mm);