]> www.infradead.org Git - users/hch/misc.git/commit
nfs: Annotate struct nfs_cache_array with __counted_by()
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 14 Aug 2024 10:01:28 +0000 (12:01 +0200)
committerAnna Schumaker <anna.schumaker@oracle.com>
Mon, 23 Sep 2024 19:03:12 +0000 (15:03 -0400)
commitbb8e4ce500cb09950c2b51a3be0e94e337a215aa
treefce7a247c65f89400e27cf1b8a43597bdb2fb678
parentd98f72272500f505cd7e152ffa456e64ee3855f0
nfs: Annotate struct nfs_cache_array with __counted_by()

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

Increment size before adding a new struct to the array.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/dir.c