diff options
author | Ryusuke Konishi <konishi.ryusuke@gmail.com> | 2024-08-10 08:52:42 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-09-02 02:59:00 +0200 |
commit | 5787fcaab9eb5930f5378d6a1dd03d916d146622 (patch) | |
tree | 529b6911e15d935e85cbbb475b9bb5bf66ce0b1b /fs/nilfs2/segment.c | |
parent | nilfs2: protect references to superblock parameters exposed in sysfs (diff) | |
download | linux-5787fcaab9eb5930f5378d6a1dd03d916d146622.tar.xz linux-5787fcaab9eb5930f5378d6a1dd03d916d146622.zip |
nilfs2: fix missing cleanup on rollforward recovery error
In an error injection test of a routine for mount-time recovery, KASAN
found a use-after-free bug.
It turned out that if data recovery was performed using partial logs
created by dsync writes, but an error occurred before starting the log
writer to create a recovered checkpoint, the inodes whose data had been
recovered were left in the ns_dirty_files list of the nilfs object and
were not freed.
Fix this issue by cleaning up inodes that have read the recovery data if
the recovery routine fails midway before the log writer starts.
Link: https://lkml.kernel.org/r/20240810065242.3701-1-konishi.ryusuke@gmail.com
Fixes: 0f3e1c7f23f8 ("nilfs2: recovery functions")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions