From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, tzungbi@kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/hdcp: Call drm_connector_list_iter_end() on early return
Date: Tue, 01 Dec 2026 17:26:53 +0200 [thread overview]
Message-ID: <a40e6d2684bc7095e8970084d0a49ad8f600e4ce@intel.com> (raw)
In-Reply-To: <20261201085340.1471343-1-tzungbi@kernel.org>
On Tue, 01 Dec 2026, Tzung-Bi Shih <tzungbi@kernel.org> wrote:
> Commit 9284ab3b6e77 ("drm/i915/hdcp: check streams[] bounds before
> overflow") moved the data->k bounds check in
> intel_hdcp_required_content_stream() into the loop, returning -EINVAL
> directly without calling drm_connector_list_iter_end() to release held
> resources.
>
> Call drm_connector_list_iter_end() before returning -EINVAL.
>
> Fixes: 9284ab3b6e77 ("drm/i915/hdcp: check streams[] bounds before overflow")
> Cc: stable@vger.kernel.org
Fixes: bbb15a6b042d ("drm/i915/hdcp: check streams[] bounds before overflow")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> ---
> drivers/gpu/drm/i915/display/intel_hdcp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index dad0c854e4fa..2c1ce65e7f9a 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -145,8 +145,10 @@ intel_hdcp_required_content_stream(struct intel_atomic_state *state,
> if (!new_conn_state || !new_conn_state->crtc)
> continue;
>
> - if (drm_WARN_ON(display->drm, data->k >= INTEL_NUM_PIPES(display)))
> + if (drm_WARN_ON(display->drm, data->k >= INTEL_NUM_PIPES(display))) {
> + drm_connector_list_iter_end(&conn_iter);
I dislike calling this within the loop, but *shrug*, there's no clean
alternative, really.
> return -EINVAL;
> + }
>
> data->streams[data->k].stream_id =
> intel_conn_to_vcpi(state, connector);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-12-01 15:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 8:53 [PATCH] drm/i915/hdcp: Call drm_connector_list_iter_end() on early return Tzung-Bi Shih
2026-12-01 9:04 ` ✓ CI.KUnit: success for " Patchwork
2026-12-01 9:07 ` [PATCH] " sashiko-bot
2026-12-01 9:42 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-12-01 15:26 ` Jani Nikula [this message]
2026-12-01 15:30 ` ✓ i915.CI.BAT: " Patchwork
2026-12-01 21:14 ` ✓ Xe.CI.FULL: " Patchwork
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=a40e6d2684bc7095e8970084d0a49ad8f600e4ce@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tursulin@ursulin.net \
--cc=tzungbi@kernel.org \
/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.