[PATCH v3] drm/i915/gt: Protect against overflow in active_engine()
Andi Shyti
andi.shyti at kernel.org
Sat Aug 9 13:57:33 UTC 2025
Hi Krzysztof,
On Tue, Aug 05, 2025 at 11:41:42AM +0000, Krzysztof Karas wrote:
> 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 at intel.com>
merged to drm-intel-gt-next.
Thanks,
Andi
More information about the Intel-gfx
mailing list