Re: [PATCH v2] wifi: ath11k: Fix ath11k_htc_record flexible record

From: Gustavo A. R. Silva
Date: Wed Dec 06 2023 - 16:23:41 EST




On 12/6/23 14:55, Kees Cook wrote:
On Tue, Dec 05, 2023 at 01:00:17PM -0800, Jeff Johnson wrote:
Transform the zero-length ath11k_htc_record::credit_report array into
a proper flexible array. Since this is the only array in
ath11k_htc_record, remove the unnecessary union.

Signed-off-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>

Heh, looks good. I wonder why this was a union to begin with?

It used to contain a couple of members:

https://lore.kernel.org/linux-wireless/20231127-flexarray-htc_record-v1-3-6be1f36126fd@xxxxxxxxxxx/
https://lore.kernel.org/linux-wireless/4f2a486c-c6de-43e4-8bb6-bdd3f819b0a9@xxxxxxxxxxxxxx/

--
Gustavo


Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>