ntfs3: initialize err in attr_wof_frame_info
PATCH 1/1 ntfs3: initialize err in attr_wof_frame_info
attr_wof_frame_info() may reuse a cached offsets folio. In that case the loop can fill the output offsets without calling attr_load_runs_range() or ntfs_read_run(), leaving err uninitialized before the common return path. Initialize err to 0 for the successful cached path.
Signed-off-by Ruoyu Wang <[email protected]>
--- fs/ntfs3/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/attrib.c +1 -1
@@ -1516,7 +1516,7 @@ int attr_wof_frame_info(struct ntfs_inode *ni, struct ATTRIB *attr,u8 bytes_per_off;char *addr;struct folio *folio; -int i, err; +int i, err =0 ;__le32 *off32;__le64 *off64;
Signature · 1 line
2.51.0
Konstantin Komarov
maintainerQuoted 24 lines · Ruoyu Wang
attr_wof_frame_info()may reuse a cached offsets folio. In that case the loop can fill the output offsets without callingattr_load_runs_range()orntfs_read_run(), leaving err uninitialized before the common return path. Initialize err to 0 for the successful cached path.Signed-off-by Ruoyu Wang <[email protected]>--- fs/ntfs3/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ntfs3/attrib.c +1
-2@@ -1516,7 +1516,7 @@ int attr_wof_frame_info(struct ntfs_inode *ni, struct ATTRIB *attr,u8 bytes_per_off;char *addr;struct folio *folio; -int i, err; +int i, err =0 ;__le32 *off32;__le64 *off64; --
Quoted 2 lines
2.51.0
Hello,
Sorry for the delay.
The patch was applied, thank you.
Regards,
Konstantin