diff mbox series

[2/2] wifi: ath11k: annotate ch_param of struct scan_chan_list_params with __counted_by

Message ID 20241021142745.585308-2-dmantipov@yandex.ru (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show
Series [1/2] wifi: ath11k: annotate skb of struct ath11k_ce_ring with __counted_by | expand

Commit Message

Dmitry Antipov Oct. 21, 2024, 2:27 p.m. UTC
According to 'ath11k_reg_update_chan_list()', annotate flexible
array member 'ch_param' of 'struct scan_chan_list_params' with
'__counted_by()' attribute to improve runtime bounds checking
when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath11k/wmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 8982b909c821..58471da42087 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -3819,7 +3819,7 @@  struct wmi_stop_scan_cmd {
 struct scan_chan_list_params {
 	u32 pdev_id;
 	u16 nallchans;
-	struct channel_param ch_param[];
+	struct channel_param ch_param[] __counted_by(nallchans);
 };
 
 struct wmi_scan_chan_list_cmd {