diff options
| author | Ryusuke Konishi <konishi.ryusuke@gmail.com> | 2026-07-20 23:16:52 +0900 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-07-28 16:54:00 -0700 |
| commit | 66f4ad3ce158902e5f98afea93189972ed8750c2 (patch) | |
| tree | 815c08fc126a96b1ddf51a2c70bb35ff08727ef0 /tools/unittests/git@git.tavy.me:linux.git | |
| parent | 7cb2f76a6a2ba2130b577cb8ac13e1e46c4fc689 (diff) | |
nilfs2: fix BUG in nilfs_copy_dirty_pages() on dirty state mismatch
Syzbot reported a kernel BUG triggered within nilfs_copy_dirty_pages(),
which copies dirty DAT file folios/pages to its shadow page cache. The
BUG occurs when a retrieved dirty folio/page unexpectedly loses its
'dirty' status.
This issue arises because, since the commit referenced below, the 'dirty'
flag of a folio/page can be cleared asynchronously after the filesystem
detects metadata corruption and transitions to read-only mode.
Resolve the issue by returning an -EROFS error if the filesystem has
transitioned to read-only mode. Also change the behavior to issue a
kernel warning only once instead of triggering a kernel BUG when this
unexpected 'dirty' state is detected while the filesystem is not in
read-only mode.
Reported-by: syzbot+8baf9a79a3ffc6271cb6@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8baf9a79a3ffc6271cb6
Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption")
Signed-off-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
