]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/sched: Fix bounds limiting when given a malformed entity
authorLuben Tuikov <ltuikov89@gmail.com>
Thu, 23 Nov 2023 04:58:53 +0000 (23:58 -0500)
committerLuben Tuikov <ltuikov89@gmail.com>
Sat, 25 Nov 2023 03:56:57 +0000 (22:56 -0500)
commit2bbe6ab2be53858507f11f99f856846d04765ae3
tree98b95a838cbe427e87eb102decf9d0165e719b37
parent46990918f35c1bf6e367cf8e0423e7344fec9fcb
drm/sched: Fix bounds limiting when given a malformed entity

If we're given a malformed entity in drm_sched_entity_init()--shouldn't
happen, but we verify--with out-of-bounds priority value, we set it to an
allowed value. Fix the expression which sets this limit.

Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
Fixes: 56e449603f0ac5 ("drm/sched: Convert the GPU scheduler to variable number of run-queues")
Link: https://patchwork.freedesktop.org/patch/msgid/20231123122422.167832-2-ltuikov89@gmail.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/dbb91dbe-ef77-4d79-aaf9-2adb171c1d7a@amd.com
drivers/gpu/drm/scheduler/sched_entity.c