]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ocfs2: annotate more flexible array members with __counted_by_le()
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 21 Oct 2025 10:55:18 +0000 (13:55 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:44:18 +0000 (19:44 -0800)
commit29300f929eb1f9b3e555b834d05f2e9d73da303f
tree5c98eb6c287eb96eb29705c5793ecc53c8521bdb
parente0b0f2834c9bec51b1068de5cf5e10c7519143eb
ocfs2: annotate more flexible array members with __counted_by_le()

Annotate flexible array members of 'struct ocfs2_local_alloc' and 'struct
ocfs2_inline_data' with '__counted_by_le()' attribute to improve array
bounds checking when CONFIG_UBSAN_BOUNDS is enabled, and prefer the
convenient 'memset()' over an explicit loop to simplify
'ocfs2_clear_local_alloc()'.

Link: https://lkml.kernel.org/r/20251021105518.119953-1-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Heming Zhao <heming.zhao@suse.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/localalloc.c
fs/ocfs2/ocfs2_fs.h