mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
nfs: Annotate struct pnfs_commit_array with __counted_by()
Add the __counted_by compiler attribute to the flexible array member buckets to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Compile-tested only. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
79a66e1465
commit
e8e26a0b09
@ -1336,7 +1336,7 @@ struct pnfs_commit_array {
|
||||
struct rcu_head rcu;
|
||||
refcount_t refcount;
|
||||
unsigned int nbuckets;
|
||||
struct pnfs_commit_bucket buckets[];
|
||||
struct pnfs_commit_bucket buckets[] __counted_by(nbuckets);
|
||||
};
|
||||
|
||||
struct pnfs_ds_commit_info {
|
||||
|
Loading…
Reference in New Issue
Block a user