public inbox for linux-hardening@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-usb@vger.kernel.org,
	Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL HARDENING (not covered by other
	areas):Keyword:b__counted_by(_le|_be)?b"
	<linux-hardening@vger.kernel.org>
Subject: Re: [PATCHv2] thunderbolt: use kzalloc_flex
Date: Wed, 18 Mar 2026 14:40:56 +0100	[thread overview]
Message-ID: <20260318134056.GJ2275908@black.igk.intel.com> (raw)
In-Reply-To: <20260316182112.8682-1-rosenp@gmail.com>

On Mon, Mar 16, 2026 at 11:21:12AM -0700, Rosen Penev wrote:
> diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
> index e96474f17067..4e66b53860dd 100644
> --- a/drivers/thunderbolt/tb.h
> +++ b/drivers/thunderbolt/tb.h
> @@ -440,9 +440,10 @@ struct tb_path {
>  	bool drop_packages;
>  	bool activated;
>  	bool clear_fc;
> -	struct tb_path_hop *hops;
>  	int path_length;
>  	bool alloc_hopid;
> +
> +	struct tb_path_hop hops[] __counted_by(path_length);

Please update the kernel-doc too. Other than that this looks good.

      reply	other threads:[~2026-03-18 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 18:21 [PATCHv2] thunderbolt: use kzalloc_flex Rosen Penev
2026-03-18 13:40 ` 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=20260318134056.GJ2275908@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rosenp@gmail.com \
    --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