diff options
| author | Ryusuke Konishi <konishi.ryusuke@gmail.com> | 2026-09-04 02:23:58 +0900 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-09-03 13:22:32 -0700 |
| commit | 3f6df9ae1b5e4ae2278200cbf670ff32dbe8f4e1 (patch) | |
| tree | 1043d47abe9c8ce1837c6ff8fafda484f2feae9a /tools/perf/scripts/python | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-3f6df9ae1b5e4ae2278200cbf670ff32dbe8f4e1.tar.gz linux-3f6df9ae1b5e4ae2278200cbf670ff32dbe8f4e1.zip | |
nilfs2: strengthen consistency checks in nilfs_direct_propagate()
nilfs_direct_propagate() is responsible for updating the virtual block
number associated with a dirty data block in the direct mapping.
It is not designed to handle intermediate node blocks. Furthermore, it
assumes that the block offset of the passed buffer head is within the
range of NILFS_DIRECT_KEY_MAX; otherwise, an out-of-bounds memory access
could occur within the inode containing the bmap root.
While such inconsistencies stem from bugs, they can cause silent,
harmful side effects unless a debug kernel is used - as was the case
with a recent slab out-of-bounds access issue found in this function.
Therefore, issue a kernel warning via WARN_ON_ONCE() and return -EINVAL
for these anomalies, allowing the bmap layer to handle the situation as
a filesystem error.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
