summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorKrzysztof Karas <krzysztof.karas@intel.com>2025-08-05 11:41:42 +0000
committerAndi Shyti <andi.shyti@kernel.org>2025-08-09 10:44:53 -0100
commit317be9c64215f264740c6dffb0a44216960875b2 (patch)
tree5101dc5469d1b54659a31f0e08d9e1ad3e77a07d /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentf768ebbba9110846c9f986a96109d70154d60b5d (diff)
drm/i915/gt: Protect against overflow in active_engine()
It is unlikely, but possible for the first call to intel_context_create() to fail with -ENOMEM, which would result in entering the following code block and decrementing "count", when it is set to 0 (initial condition in the for loop). Protect from overflowing the variable by checking for 0 value of "count" before entering the loop. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://lore.kernel.org/r/pogr74jktdqehrfap4tjky23ees4x7erh5dwgg5jb2n522cfkw@kpnxe4qzx4pj
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions