[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240701213215.433101-1-robdclark@gmail.com>
Date: Mon, 1 Jul 2024 14:32:14 -0700
From: Rob Clark <robdclark@...il.com>
To: dri-devel@...ts.freedesktop.org
Cc: freedreno@...ts.freedesktop.org,
linux-arm-msm@...r.kernel.org,
Rob Clark <robdclark@...omium.org>,
kernel test robot <lkp@...el.com>,
Rob Clark <robdclark@...il.com>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] drm/msm/gem: Add missing rcu_dereference()
From: Rob Clark <robdclark@...omium.org>
Fixes a sparse "different address spaces" error.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406280050.syeEwLTE-lkp@intel.com/
Signed-off-by: Rob Clark <robdclark@...omium.org>
---
drivers/gpu/drm/msm/msm_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index ddc6a131c041..ebc9ba66efb8 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -48,7 +48,7 @@ static void update_ctx_mem(struct drm_file *file, ssize_t size)
uint64_t ctx_mem = atomic64_add_return(size, &ctx->ctx_mem);
rcu_read_lock(); /* Locks file->pid! */
- trace_gpu_mem_total(0, pid_nr(file->pid), ctx_mem);
+ trace_gpu_mem_total(0, pid_nr(rcu_dereference(file->pid)), ctx_mem);
rcu_read_unlock();
}
--
2.45.2
Powered by blists - more mailing lists