]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rcu: Annotate struct kvfree_rcu_bulk_data with __counted_by()
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 7 Aug 2024 09:55:00 +0000 (11:55 +0200)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Sun, 11 Aug 2024 06:04:47 +0000 (11:34 +0530)
commitfb579e6656a8d5e042e65062f68ca41321817237
treeb24ac77200be3bdad468bf030f394132a566add6
parent9aed3b51fd6186582a95abd9fa67782982540749
rcu: Annotate struct kvfree_rcu_bulk_data with __counted_by()

Add the __counted_by compiler attribute to the flexible array member
records to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.

Increment nr_records before adding a new pointer to the records array.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Reviewed-by: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
kernel/rcu/tree.c