Skip to content

Commit 1f74400

Browse files
houlz0507superm1
authored andcommitted
accel/amdxdna: Use rcu_access_pointer for __rcu pointer
Use rcu_access_pointer for pid in struct drm_file. This fixes sparse warning. Fixes: be462c9 ("accel/amdxdna: Add hardware context") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311210.LfeHTzLw-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-4-lizhi.hou@amd.com
1 parent c199310 commit 1f74400

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/accel/amdxdna/amdxdna_pci_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
6161
goto put_rpm;
6262
}
6363

64-
client->pid = pid_nr(filp->pid);
64+
client->pid = pid_nr(rcu_access_pointer(filp->pid));
6565
client->xdna = xdna;
6666

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

0 commit comments

Comments
 (0)