aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGao Xiang <[email protected]>2021-10-25 15:43:11 +0800
committerGao Xiang <[email protected]>2021-10-31 21:00:28 +0800
commita0961f351d82d43ab0b845304caa235dfe249ae9 (patch)
tree41480cd2f7f4458ab1747c90e02e870b7a7f2d94
parenteaa9172ad988b3ef5c59a051c825706252d435e1 (diff)
erofs: don't trigger WARN() when decompression fails
syzbot reported a WARNING [1] due to corrupted compressed data. As Dmitry said, "If this is not a kernel bug, then the code should not use WARN. WARN if for kernel bugs and is recognized as such by all testing systems and humans." [1] https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Cc: Dmitry Vyukov <[email protected]> Reviewed-by: Chao Yu <[email protected]> Reported-by: [email protected] Signed-off-by: Gao Xiang <[email protected]>
-rw-r--r--fs/erofs/decompressor.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index a0786b95cdf9..bf37fc76b182 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -227,7 +227,6 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_decompress_req *rq,
erofs_err(rq->sb, "failed to decompress %d in[%u, %u] out[%u]",
ret, rq->inputsize, inputmargin, rq->outputsize);
- WARN_ON(1);
print_hex_dump(KERN_DEBUG, "[ in]: ", DUMP_PREFIX_OFFSET,
16, 1, src + inputmargin, rq->inputsize, true);
print_hex_dump(KERN_DEBUG, "[out]: ", DUMP_PREFIX_OFFSET,