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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Lizhi Hou <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c199310 commit 1f74400

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)