Skip to content

Commit 7775352

Browse files
committed
drm/msm/gem: Add missing rcu_dereference()
Fixes a sparse "different address spaces" error. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406280050.syeEwLTE-lkp@intel.com/ Signed-off-by: Rob Clark <robdclark@chromium.org> Patchwork: https://patchwork.freedesktop.org/patch/601612/
1 parent ad7f529 commit 7775352

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/msm/msm_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void update_ctx_mem(struct drm_file *file, ssize_t size)
4848
uint64_t ctx_mem = atomic64_add_return(size, &ctx->ctx_mem);
4949

5050
rcu_read_lock(); /* Locks file->pid! */
51-
trace_gpu_mem_total(0, pid_nr(file->pid), ctx_mem);
51+
trace_gpu_mem_total(0, pid_nr(rcu_dereference(file->pid)), ctx_mem);
5252
rcu_read_unlock();
5353

5454
}

0 commit comments

Comments
 (0)