Messages in this thread Patch in this message | | | From | Edward Adam Davis <> | Subject | Re: [syzbot] [hfs?] possible deadlock in hfs_extend_file (2) | Date | Tue, 2 Jan 2024 19:37:31 +0800 |
| |
please test possible deadlock in hfs_extend_file
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 610a9b8f49fb
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c index 6d1878b99b30..1b02c7b6a10c 100644 --- a/fs/hfs/extent.c +++ b/fs/hfs/extent.c @@ -197,6 +197,10 @@ static int hfs_ext_read_extent(struct inode *inode, u16 block) block < HFS_I(inode)->cached_start + HFS_I(inode)->cached_blocks) return 0; + if (HFS_I(inode)->flags & HFS_FLG_EXT_DIRTY && + HFS_I(inode)->flags & HFS_FLG_EXT_NEW) + return -ENOENT; + res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); if (!res) { res = __hfs_ext_cache_extent(&fd, inode, block);
| |