]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udf: refactor inode_bmap() to handle error
authorZhao Mengmeng <zhaomengmeng@kylinos.cn>
Tue, 1 Oct 2024 11:54:25 +0000 (19:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 01:02:34 +0000 (02:02 +0100)
commitb22d9a5698abf04341f8fbc30141e0673863c3a6
treec2b07305d84f43cdaa05ebc5e531983f77e8aa29
parent506b1961dbcc49483820ee14f4a2ca2f5459eace
udf: refactor inode_bmap() to handle error

[ Upstream commit c226964ec786f3797ed389a16392ce4357697d24 ]

Refactor inode_bmap() to handle error since udf_next_aext() can return
error now. On situations like ftruncate, udf_extend_file() can now
detect errors and bail out early without resorting to checking for
particular offsets and assuming internal behavior of these functions.

Reported-by: syzbot+7a4842f0b1801230a989@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7a4842f0b1801230a989
Tested-by: syzbot+7a4842f0b1801230a989@syzkaller.appspotmail.com
Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20241001115425.266556-4-zhaomzhao@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/udf/directory.c
fs/udf/inode.c
fs/udf/partition.c
fs/udf/truncate.c
fs/udf/udfdecl.h