diff options
| author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2026-10-08 00:14:54 +0200 |
|---|---|---|
| committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2026-10-13 15:44:58 +0200 |
| commit | ea25564bf05743da4f1e56ffe3e99aa8b4fa4d25 (patch) | |
| tree | 7cdd754bf0a0c2ced98b48a91cb5dbfb726bca5c /tools/lib/python | |
| parent | c9d3f5031aa911cf0da848d7f72ed0c7d626f713 (diff) | |
| download | linux-next-ea25564bf05743da4f1e56ffe3e99aa8b4fa4d25.tar.gz linux-next-ea25564bf05743da4f1e56ffe3e99aa8b4fa4d25.zip | |
fs/ntfs3: fix stale attr_b in attr_allocate_frame()
ni_insert_nonresident() can create an attribute list and move the base
$DATA attribute to another MFT record, which invalidates attr_b and
mi_b. attr_allocate_frame() kept using the stale pointers afterwards
to update valid_size, writing into a record that no longer holds the
attribute. The same situation is already handled in
attr_data_get_block_locked(), which re-reads the base attribute after
the layout changes.
Look up attr_b again after the insertion, and read valid_size from the
attribute before the layout can change.
While here, flatten the 'if (attr)' block in attr_allocate_frame() by
returning early to ins_ext, and simplify an empty-bodied if in
attr_data_get_block_locked().
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
