Linux USB
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: raoxu <raoxu@uniontech.com>
Cc: andreas.noever@gmail.com, westeri@kernel.org,
	YehezkelShB@gmail.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v4] thunderbolt: fix bandwidth group reservation indexing
Date: Thu, 25 Jun 2026 08:50:31 +0200	[thread overview]
Message-ID: <20260625065031.GJ3066@black.igk.intel.com> (raw)
In-Reply-To: <7683233B90328D40+20260624062703.601833-1-raoxu@uniontech.com>

On Wed, Jun 24, 2026 at 02:27:03PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
> 
> Valid bandwidth group IDs range from 1 through MAX_GROUPS, while Group
> ID 0 is reserved. tb_consumed_dp_bandwidth() uses the Group ID directly
> to index its local group_reserved[] array.
> 
> The array currently has MAX_GROUPS entries, so its valid indices are 0
> through MAX_GROUPS - 1. Group ID MAX_GROUPS therefore accesses one
> element past the end, and the final group's reserved bandwidth is not
> included when the array is summed.
> 
> Give group_reserved[] MAX_GROUPS + 1 entries so direct Group ID
> indexing covers the reserved ID 0 and valid IDs 1 through MAX_GROUPS.
> 
> Fixes: 52a4490e89d7 ("thunderbolt: Reserve released DisplayPort bandwidth for a group for 10 seconds")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Rao <raoxu@uniontech.com>

Applied to thunderbolt.git/fixes, thanks!

      reply	other threads:[~2026-06-25  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  6:27 [PATCH v4] thunderbolt: fix bandwidth group reservation indexing raoxu
2026-06-25  6:50 ` Mika Westerberg [this message]

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=20260625065031.GJ3066@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=raoxu@uniontech.com \
    --cc=stable@vger.kernel.org \
    --cc=westeri@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox