[lvc-project] [PATCH 1/2] wifi: ath12k: annotate skb of struct ath12k_ce_ring with __counted_by
Dmitry Antipov
dmantipov at yandex.ru
Mon Oct 21 17:34:18 MSK 2024
Accorind to 'ath12k_ce_alloc_ring()', annotate flexible array
member 'skb' of 'struct ath12k_ce_ring' with '__counted_by()'
to improve runtime bounds checking when CONFIG_UBSAN_BOUNDS is
enabled. Compile tested only.
Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
---
drivers/net/wireless/ath/ath12k/ce.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/ce.h b/drivers/net/wireless/ath/ath12k/ce.h
index 857bc5f9e946..6967e3891030 100644
--- a/drivers/net/wireless/ath/ath12k/ce.h
+++ b/drivers/net/wireless/ath/ath12k/ce.h
@@ -135,7 +135,7 @@ struct ath12k_ce_ring {
u32 hal_ring_id;
/* keep last */
- struct sk_buff *skb[];
+ struct sk_buff *skb[] __counted_by(nentries);
};
struct ath12k_ce_pipe {
--
2.47.0
More information about the lvc-project
mailing list