udf: Fix BUG on corrupted inode
commit570f31838a932c1c748db703a49e0671ee84ce08
authorJan Kara <jack@suse.cz>
Wed, 12 Dec 2018 13:29:20 +0000 (12 14:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:18 +0000 (12 20:02 +0100)
tree67cc77c6befdc680ec06c38624ad974efcd26e11
parent92430df6f8fbb7c47d70302e8ac92cd9dc68f14d
udf: Fix BUG on corrupted inode

[ Upstream commit d288d95842f1503414b7eebce3773bac3390457e ]

When inode is corrupted so that extent type is invalid, some functions
(such as udf_truncate_extents()) will just BUG. Check that extent type
is valid when loading the inode to memory.

Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/udf/inode.c