mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/msm: Synchronize set_sysprof on ctxlock
A user that was perfmon_capable() could try to race setting SYSPROF param on multiple threads to trigger a reference leak. Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/743091/ Message-ID: <20260729155609.20190-5-robin.clark@oss.qualcomm.com>
This commit is contained in:
parent
2c26f9e46d
commit
2b1bfcb59d
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
int msm_context_set_sysprof(struct msm_context *ctx, struct msm_gpu *gpu, int sysprof)
|
||||
{
|
||||
guard(rwsem_write)(&ctx->ctxlock);
|
||||
|
||||
/*
|
||||
* Since pm_runtime and sysprof_active are both refcounts, we
|
||||
* call apply the new value first, and then unwind the previous
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user