linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs: don't trigger WARN() when decompression fails
@ 2021-10-25  7:43 Gao Xiang
  2021-10-29  6:35 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Gao Xiang @ 2021-10-25  7:43 UTC (permalink / raw)
  To: linux-erofs; +Cc: Gao Xiang, LKML, Dmitry Vyukov, syzbot+d8aaffc3719597e8cfb4

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/000000000000b3586105cf0ff45e@google.com
Reported-by: syzbot+d8aaffc3719597e8cfb4@syzkaller.appspotmail.com
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
 fs/erofs/decompressor.c | 1 -
 1 file changed, 1 deletion(-)

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,
-- 
2.24.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] erofs: don't trigger WARN() when decompression fails
  2021-10-25  7:43 [PATCH] erofs: don't trigger WARN() when decompression fails Gao Xiang
@ 2021-10-29  6:35 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2021-10-29  6:35 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs; +Cc: syzbot+d8aaffc3719597e8cfb4, LKML, Dmitry Vyukov

On 2021/10/25 15:43, Gao Xiang wrote:
> 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/000000000000b3586105cf0ff45e@google.com
> Reported-by: syzbot+d8aaffc3719597e8cfb4@syzkaller.appspotmail.com
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Chao Yu <chao@kernel.org>
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-29  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  7:43 [PATCH] erofs: don't trigger WARN() when decompression fails Gao Xiang
2021-10-29  6:35 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).