aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorYuezhang Mo <[email protected]>2024-12-13 05:08:37 +0000
committerNamjae Jeon <[email protected]>2024-12-31 08:49:40 +0000
commitfee873761bd978d077d8c55334b4966ac4cb7b59 (patch)
treee3cdf91d80cad81dbf118239129d76ce02dd06d8 /fs/jbd2/commit.c
parentexfat: fix exfat_find_empty_entry() not returning error on failure (diff)
downloadkernel-fee873761bd978d077d8c55334b4966ac4cb7b59.tar.gz
kernel-fee873761bd978d077d8c55334b4966ac4cb7b59.zip
exfat: fix the infinite loop in exfat_readdir()
If the file system is corrupted so that a cluster is linked to itself in the cluster chain, and there is an unused directory entry in the cluster, 'dentry' will not be incremented, causing condition 'dentry < max_dentries' unable to prevent an infinite loop. This infinite loop causes s_lock not to be released, and other tasks will hang, such as exfat_sync_fs(). This commit stops traversing the cluster chain when there is unused directory entry in the cluster to avoid this infinite loop. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=205c2644abdff9d3f9fc Tested-by: [email protected] Fixes: ca06197382bd ("exfat: add directory operations") Signed-off-by: Yuezhang Mo <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions