aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
diff options
context:
space:
mode:
authorYu Kuai <[email protected]>2023-03-08 02:32:08 +0000
committerJens Axboe <[email protected]>2023-03-08 14:34:50 +0000
commite2f2a39452c43b64ea3191642a2661cb8d03827a (patch)
treebb85a3d9c05661e2c356f44fa95b0da4e059064d /drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
parentdocs: sysfs-block: document hidden sysfs entry (diff)
downloadkernel-e2f2a39452c43b64ea3191642a2661cb8d03827a.tar.gz
kernel-e2f2a39452c43b64ea3191642a2661cb8d03827a.zip
block, bfq: fix uaf for 'stable_merge_bfqq'
Before commit fd571df0ac5b ("block, bfq: turn bfqq_data into an array in bfq_io_cq"), process reference is read before bfq_put_stable_ref(), and it's safe if bfq_put_stable_ref() put the last reference, because process reference will be 0 and 'stable_merge_bfqq' won't be accessed in this case. However, the commit changed the order and will cause uaf for 'stable_merge_bfqq'. In order to emphasize that bfq_put_stable_ref() can drop the last reference, fix the problem by moving bfq_put_stable_ref() to the end of bfq_setup_stable_merge(). Fixes: fd571df0ac5b ("block, bfq: turn bfqq_data into an array in bfq_io_cq") Reported-and-tested-by: Shinichiro Kawasaki <[email protected]> Link: https://lore.kernel.org/linux-block/20230307071448.rzihxbm4jhbf5krj@shindev/ Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c')
0 files changed, 0 insertions, 0 deletions