diff options
| author | Joshua Crofts <joshua.crofts1@gmail.com> | 2026-07-17 10:58:54 +0000 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-07-28 16:39:45 -0700 |
| commit | ce5a5ad1a8330a2fcfdd9ec2ab341be739e89a18 (patch) | |
| tree | 67de077713c09ee4ea22ef8a2da928e5125dc064 /tools/unittests/git@git.tavy.me:linux.git | |
| parent | 45662dedb8f272ef7f16e69f13424c4bd0399240 (diff) | |
nilfs2: fix infinite loop in nilfs_clean_segments()
syzbot reported a hung task in nilfs_transaction_begin(). This occurs
because the cleaner ioctl falls into an infinite loop if
nilfs_segctor_construct() repeatedly returns -EROFS (e.g. the device
is remounted as read-only after an I/O error).
Currently in nilfs_clean_segments(), if err is non-zero, it logs the
error and sleeps but doesn't abort when it encounters a terminal error
like -EROFS. This causes the thread to loop forever.
Fix this by breaking out of the loop if nilfs_segctor_construct()
returns -EROFS. This matches the behaviour in
nilfs_segctor_write_out(), which also handles -EROFS.
Reported-by: syzbot+cae54346a70bbceeff2c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=cae54346a70bbceeff2c
Fixes: 9ff05123e3bf ("nilfs2: segment constructor")
Assisted-by: gemini:gemini-3.1-pro
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Diffstat (limited to 'tools/unittests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
