[lvc-project] [PATCH] ocfs2: add extra flags check in ocfs2_ioctl_move_extents()

Dmitry Antipov dmantipov at yandex.ru
Thu Oct 9 13:25:03 MSK 2025


On 10/9/25 10:51 AM, Joseph Qi wrote:

> So you mean the reproducer passes OCFS2_MOVE_EXT_FL_COMPLETE through
> ioctl and then trigger this BUG?

Looking from the kernel side, the reproducer has passed
ocfs2_ioctl_move_extents({ .range.me_flags = 0x0; }) once,
and next call to ocfs2_ioctl_move_extents({ .range.me_flags = 0x4; })
has triggered the BUG() actually.

> This looks more sane and seems directly fix the BUG.
> BTW, we'd better also log the extent flags.

If so, the whole thing has to be split into two patches:
1) reject invalid flags in ocfs2_ioctl_move_extents();
2) in __ocfs2_move_extent(), relax BUG() to ocfs2_error().

Dmitry



More information about the lvc-project mailing list