aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
diff options
context:
space:
mode:
authorPaolo Valente <[email protected]>2019-11-14 09:33:11 +0000
committerJens Axboe <[email protected]>2019-11-14 14:00:54 +0000
commit478de3380c1c7dbb0f65f545ee0185848413f3fe (patch)
tree11ad17255fb0d30ea1cc2139f0017af571d6496c /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
parentio_uring: ensure registered buffer import returns the IO length (diff)
downloadkernel-478de3380c1c7dbb0f65f545ee0185848413f3fe.tar.gz
kernel-478de3380c1c7dbb0f65f545ee0185848413f3fe.zip
block, bfq: deschedule empty bfq_queues not referred by any process
Since commit 3726112ec731 ("block, bfq: re-schedule empty queues if they deserve I/O plugging"), to prevent the service guarantees of a bfq_queue from being violated, the bfq_queue may be left busy, i.e., scheduled for service, even if empty (see comments in __bfq_bfqq_expire() for details). But, if no process will send requests to the bfq_queue any longer, then there is no point in keeping the bfq_queue scheduled for service. In addition, keeping the bfq_queue scheduled for service, but with no process reference any longer, may cause the bfq_queue to be freed when descheduled from service. But this is assumed to never happen, and causes a UAF if it happens. This, in turn, caused crashes [1, 2]. This commit fixes this issue by descheduling an empty bfq_queue when it remains with not process reference. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1767539 [2] https://bugzilla.kernel.org/show_bug.cgi?id=205447 Fixes: 3726112ec731 ("block, bfq: re-schedule empty queues if they deserve I/O plugging") Reported-by: Chris Evich <[email protected]> Reported-by: Patrick Dung <[email protected]> Reported-by: Thorsten Schubert <[email protected]> Tested-by: Thorsten Schubert <[email protected]> Tested-by: Oleksandr Natalenko <[email protected]> Signed-off-by: Paolo Valente <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
0 files changed, 0 insertions, 0 deletions