All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Krzysztof Karas <krzysztof.karas@intel.com>,
	<intel-gfx@lists.freedesktop.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Andi Shyti <andi.shyti@linux.intel.com>,
	Chris Wilson <chris.p.wilson@linux.intel.com>
Subject: Re: [PATCH v3] drm/i915/gt: Protect against overflow in active_engine()
Date: Tue, 5 Aug 2025 11:55:21 +0000	[thread overview]
Message-ID: <DBUH3GL0VCBJ.2TA9NOJZM0OFM@intel.com> (raw)
In-Reply-To: <pogr74jktdqehrfap4tjky23ees4x7erh5dwgg5jb2n522cfkw@kpnxe4qzx4pj>

Hi Krzysztof

On Tue Aug 5, 2025 at 11:41 AM UTC, 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@intel.com>
> ---

Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>

--
Best regards,
Sebastian


  parent reply	other threads:[~2025-08-05 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 11:41 [PATCH v3] drm/i915/gt: Protect against overflow in active_engine() Krzysztof Karas
2025-08-05 11:46 ` Andi Shyti
2025-08-05 11:55 ` Sebastian Brzezinka [this message]
2025-08-05 12:33 ` ✓ i915.CI.BAT: success for drm/i915/gt: Protect against overflow in active_engine() (rev3) Patchwork
2025-08-05 15:38 ` ✗ i915.CI.Full: failure " Patchwork
2025-08-09  0:51 ` ✓ i915.CI.BAT: success for drm/i915/gt: Protect against overflow in active_engine() (rev4) Patchwork
2025-08-09  2:17 ` ✓ i915.CI.Full: " Patchwork
2025-08-09 13:57 ` [PATCH v3] drm/i915/gt: Protect against overflow in active_engine() Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBUH3GL0VCBJ.2TA9NOJZM0OFM@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=krzysztof.karas@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.