]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Do not bother merging very long extents
authorJan Kara <jack@suse.cz>
Fri, 16 Dec 2022 11:37:51 +0000 (12:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:10 +0000 (09:34 +0100)
commit6690f3be2667463f2a7ceab801e52538d8db9fff
treedbf4ea24bdcd2bbf9ea88c46d1c7586c7611f6f7
parent9bc764fc75a67b87185322292f634cc3867d29f9
udf: Do not bother merging very long extents

commit 52bd6b265bb05e18f8c9fde222efc3e23335767b upstream.

When merging very long extents we try to push as much length as possible
to the first extent. However this is unnecessarily complicated and not
really worth the trouble. Furthermore there was a bug in the logic
resulting in corrupting extents in the file as syzbot reproducer shows.
So just don't bother with the merging of extents that are too long
together.

CC: stable@vger.kernel.org
Reported-by: syzbot+60f291a24acecb3c2bd5@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/inode.c