diff options
author | Tejun Heo <tj@kernel.org> | 2018-05-21 08:04:35 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-05-21 08:04:35 -0700 |
commit | 197f6accacdaf9a0cf4da3c4ac8dd788633c0e38 (patch) | |
tree | c2656102606350b4398c233866cd1e6b93e7caa6 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
parent | 6b59808bfe482642287ddf3fe9d4cccb10756652 (diff) |
workqueue: Make sure struct worker is accessible for wq_worker_comm()
The worker struct could already be freed when wq_worker_comm() tries
to access it for reporting. This patch protects PF_WQ_WORKER
modifications with wq_pool_attach_mutex and makes wq_worker_comm()
test the flag before dereferencing worker from kthread_data(), which
ensures that it only dereferences when the worker struct is valid.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Lai Jiangshan <jiangshanlai@gmail.com>
Fixes: 6b59808bfe48 ("workqueue: Show the latest workqueue name in /proc/PID/{comm,stat,status}")
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
0 files changed, 0 insertions, 0 deletions