]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ocfs2: annotate flexible array members with __counted_by_le()
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 7 Oct 2025 12:35:26 +0000 (15:35 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 12 Nov 2025 18:00:14 +0000 (10:00 -0800)
commit2f26f58df041bbcf692730ff4d8ab0f250d9670d
tree5771f340dad10c8f58d1adec6a8b4cc7b9097af1
parentcd4eaccc00d79ab97d9a96f7922558558b13f220
ocfs2: annotate flexible array members with __counted_by_le()

Annotate flexible array members of 'struct ocfs2_extent_list',
'struct ocfs2_chain_list', 'struct ocfs2_truncate_log',
'struct ocfs2_dx_entry_list', 'ocfs2_refcount_list' and
'struct ocfs2_xattr_header' with  '__counted_by_le()'
attribute to improve array bounds checking when
CONFIG_UBSAN_BOUNDS is enabled.

[dmantipov@yandex.ru: fix __counted_by_le() usage in ocfs2_expand_inline_dx_root()]
Link: https://lkml.kernel.org/r/20251014070324.130313-1-dmantipov@yandex.ru
Link: https://lkml.kernel.org/r/20251007123526.213150-1-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
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: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/dir.c
fs/ocfs2/ocfs2_fs.h