| 8b12017c | 19-Feb-2025 |
Dr. David Alan Gilbert <[email protected]> |
fs/ntfs3: Remove unused ntfs_flush_inodes
ntfs_flush_inodes() was added in 2021 by commit 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") but has remained unused.
Remove it, and it's h
fs/ntfs3: Remove unused ntfs_flush_inodes
ntfs_flush_inodes() was added in 2021 by commit 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") but has remained unused.
Remove it, and it's helper function.
Note: There is a commented out call to ntfs_flush_inodes in ntfs_truncate() - I've left that in place.
Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 14045802 | 19-Feb-2025 |
Dr. David Alan Gilbert <[email protected]> |
fs/ntfs3: Remove unused ntfs_sb_read
ntfs_sb_read() was added in 2021 by commit 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") but hasn't been used.
Remove it.
Signed-off-by: Dr. Dav
fs/ntfs3: Remove unused ntfs_sb_read
ntfs_sb_read() was added in 2021 by commit 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") but hasn't been used.
Remove it.
Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 1b998c4c | 19-Feb-2025 |
Dr. David Alan Gilbert <[email protected]> |
fs/ntfs3: Remove unused ni_load_attr
ni_load_attr() was added in 2021 by commit 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") but hasn't been used.
Remove it.
Signed-off-by: Dr
fs/ntfs3: Remove unused ni_load_attr
ni_load_attr() was added in 2021 by commit 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") but hasn't been used.
Remove it.
Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 6bb81b94 | 16-Feb-2025 |
Dan Carpenter <[email protected]> |
fs/ntfs3: Prevent integer overflow in hdr_first_de()
The "de_off" and "used" variables come from the disk so they both need to check. The problem is that on 32bit systems if they're both greater th
fs/ntfs3: Prevent integer overflow in hdr_first_de()
The "de_off" and "used" variables come from the disk so they both need to check. The problem is that on 32bit systems if they're both greater than UINT_MAX - 16 then the check does work as intended because of an integer overflow.
Fixes: 60ce8dfde035 ("fs/ntfs3: Fix wrong if in hdr_first_de") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 5ad414f4 | 16-Feb-2025 |
Dan Carpenter <[email protected]> |
fs/ntfs3: Fix a couple integer overflows on 32bit systems
On 32bit systems the "off + sizeof(struct NTFS_DE)" addition can have an integer wrapping issue. Fix it by using size_add().
Fixes: 82cae2
fs/ntfs3: Fix a couple integer overflows on 32bit systems
On 32bit systems the "off + sizeof(struct NTFS_DE)" addition can have an integer wrapping issue. Fix it by using size_add().
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| b432163e | 30-Jan-2025 |
Konstantin Komarov <[email protected]> |
fs/ntfs3: Update inode->i_mapping->a_ops on compression state
Update inode->i_mapping->a_ops when the compression state changes to ensure correct address space operations. Clear ATTR_FLAG_SPARSED/FI
fs/ntfs3: Update inode->i_mapping->a_ops on compression state
Update inode->i_mapping->a_ops when the compression state changes to ensure correct address space operations. Clear ATTR_FLAG_SPARSED/FILE_ATTRIBUTE_SPARSE_FILE when enabling compression to prevent flag conflicts.
v2: Additionally, ensure that all dirty pages are flushed and concurrent access to the page cache is blocked.
Fixes: 6b39bfaeec44 ("fs/ntfs3: Add support for the compression attribute") Reported-by: Kun Hu <[email protected]>, Jiaji Qin <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| ff355926 | 14-Oct-2024 |
Edward Adam Davis <[email protected]> |
fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
Syzbot reported a WARNING in ntfs_extend_initialized_size. The data type of in->i_valid and to is u64 in ntfs_file_mmap(). If their values are g
fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
Syzbot reported a WARNING in ntfs_extend_initialized_size. The data type of in->i_valid and to is u64 in ntfs_file_mmap(). If their values are greater than LLONG_MAX, overflow will occur because the data types of the parameters valid and new_valid corresponding to the function ntfs_extend_initialized_size() are loff_t.
Before calling ntfs_extend_initialized_size() in the ntfs_file_mmap(), the "ni->i_valid < to" has been determined, so the same WARN_ON determination is not required in ntfs_extend_initialized_size(). Just execute the ntfs_extend_initialized_size() in ntfs_extend() to make a WARN_ON check.
Reported-and-tested-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=e37dd1dfc814b10caa55 Signed-off-by: Edward Adam Davis <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 1d1a7e25 | 11-Oct-2024 |
Ye Bin <[email protected]> |
fs/ntfs3: Fix 'proc_info_root' leak when init ntfs failed
There's a issue as follows: proc_dir_entry 'fs/ntfs3' already registered WARNING: CPU: 3 PID: 9788 at fs/proc/generic.c:375 proc_registe
fs/ntfs3: Fix 'proc_info_root' leak when init ntfs failed
There's a issue as follows: proc_dir_entry 'fs/ntfs3' already registered WARNING: CPU: 3 PID: 9788 at fs/proc/generic.c:375 proc_register+0x418/0x590 Modules linked in: ntfs3(E+) Call Trace: <TASK> _proc_mkdir+0x165/0x200 init_ntfs_fs+0x36/0xf90 [ntfs3] do_one_initcall+0x115/0x6c0 do_init_module+0x253/0x760 load_module+0x55f2/0x6c80 init_module_from_file+0xd2/0x130 __x64_sys_finit_module+0xbf/0x130 do_syscall_64+0x72/0x1c0
Above issue happens as missing destroy 'proc_info_root' when error happens after create 'proc_info_root' in init_ntfs_fs(). So destroy 'proc_info_root' in error path in init_ntfs_fs().
Fixes: 7832e123490a ("fs/ntfs3: Add support /proc/fs/ntfs3/<dev>/volinfo and /proc/fs/ntfs3/<dev>/label") Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 2afd4d26 | 30-Dec-2024 |
Konstantin Komarov <[email protected]> |
fs/ntfs3: Mark inode as bad as soon as error detected in mi_enum_attr()
Extended the `mi_enum_attr()` function interface with an additional parameter, `struct ntfs_inode *ni`, to allow marking the i
fs/ntfs3: Mark inode as bad as soon as error detected in mi_enum_attr()
Extended the `mi_enum_attr()` function interface with an additional parameter, `struct ntfs_inode *ni`, to allow marking the inode as bad as soon as an error is detected.
Reported-by: [email protected] Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|
| 045fff61 | 01-Nov-2024 |
Konstantin Komarov <[email protected]> |
fs/ntfs3: Equivalent transition from page to folio
If using the proposed function folio_zero_range(), should one switch from 'start + end' to 'start + length,' or use folio_zero_segment()
Fixes: 1d
fs/ntfs3: Equivalent transition from page to folio
If using the proposed function folio_zero_range(), should one switch from 'start + end' to 'start + length,' or use folio_zero_segment()
Fixes: 1da86618bdce ("fs: Convert aops->write_begin to take a folio") Signed-off-by: Konstantin Komarov <[email protected]>
show more ...
|