Commit 131897c6 authored by Gao Xiang's avatar Gao Xiang
Browse files

erofs: fix invalid algorithm for encoded extents



The current algorithm sanity checks do not properly apply to new
encoded extents.

Unify the algorithm check with Z_EROFS_COMPRESSION(_RUNTIME)_MAX
and ensure consistency with sbi->available_compr_algs.

Reported-and-tested-by: default avatar <syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com>
Closes: https://lore.kernel.org/r/68a8bd20.050a0220.37038e.005a.GAE@google.com


Fixes: 1d191b4c ("erofs: implement encoded extent metadata")
Thanks-to: Edward Adam Davis <eadavis@qq.com>
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent c17b750b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment