summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-08-30 13:50:18 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-10-01 12:19:08 +0300
commita33fb016e49e37aafab18dc3c8314d6399cb4727 (patch)
treeab0e78ca6cf639068c95f0dc6879f8a99ef69328
parent090f612756a9720ec18b0b130e28be49839d7cb5 (diff)
downloadlwn-a33fb016e49e37aafab18dc3c8314d6399cb4727.tar.gz
lwn-a33fb016e49e37aafab18dc3c8314d6399cb4727.zip
fs/ntfs3: Fix general protection fault in run_is_mapped_full
Fixed deleating of a non-resident attribute in ntfs_create_inode() rollback. Reported-by: syzbot+9af29acd8f27fbce94bc@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r--fs/ntfs3/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 81746a959b47..5dc261404957 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -1718,7 +1718,10 @@ out6:
attr = ni_find_attr(ni, NULL, NULL, ATTR_EA, NULL, 0, NULL, NULL);
if (attr && attr->non_res) {
/* Delete ATTR_EA, if non-resident. */
- attr_set_size(ni, ATTR_EA, NULL, 0, NULL, 0, NULL, false, NULL);
+ struct runs_tree run;
+ run_init(&run);
+ attr_set_size(ni, ATTR_EA, NULL, 0, &run, 0, NULL, false, NULL);
+ run_close(&run);
}
if (rp_inserted)