CC: [email protected]
CC: [email protected]
TO: Chao Yu <[email protected]>, Chao Yu <[email protected]>
CC: Jaegeuk Kim <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 50cfa66f0de02eff30fb81bdc878bb986cf3aff3 f2fs: compress: support zstd 
compress algorithm
date:   11 months ago
:::::: branch date: 2 days ago
:::::: commit date: 11 months ago
config: i386-randconfig-m031-20210213 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '((1) << 12) << 
dic->log_cluster_size' be a 64 bit type?

Old smatch warnings:
fs/f2fs/compress.c:277 lz4_decompress_pages() warn: should '((1) << 12) << 
dic->log_cluster_size' be a 64 bit type?

vim +433 fs/f2fs/compress.c

50cfa66f0de02e Chao Yu 2020-03-03  408  
50cfa66f0de02e Chao Yu 2020-03-03  409  static int zstd_decompress_pages(struct 
decompress_io_ctx *dic)
50cfa66f0de02e Chao Yu 2020-03-03  410  {
50cfa66f0de02e Chao Yu 2020-03-03  411          ZSTD_DStream *stream = 
dic->private2;
50cfa66f0de02e Chao Yu 2020-03-03  412          ZSTD_inBuffer inbuf;
50cfa66f0de02e Chao Yu 2020-03-03  413          ZSTD_outBuffer outbuf;
50cfa66f0de02e Chao Yu 2020-03-03  414          int ret;
50cfa66f0de02e Chao Yu 2020-03-03  415  
50cfa66f0de02e Chao Yu 2020-03-03  416          inbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03  417          inbuf.src = dic->cbuf->cdata;
50cfa66f0de02e Chao Yu 2020-03-03  418          inbuf.size = dic->clen;
50cfa66f0de02e Chao Yu 2020-03-03  419  
50cfa66f0de02e Chao Yu 2020-03-03  420          outbuf.pos = 0;
50cfa66f0de02e Chao Yu 2020-03-03  421          outbuf.dst = dic->rbuf;
50cfa66f0de02e Chao Yu 2020-03-03  422          outbuf.size = dic->rlen;
50cfa66f0de02e Chao Yu 2020-03-03  423  
50cfa66f0de02e Chao Yu 2020-03-03  424          ret = 
ZSTD_decompressStream(stream, &outbuf, &inbuf);
50cfa66f0de02e Chao Yu 2020-03-03  425          if (ZSTD_isError(ret)) {
50cfa66f0de02e Chao Yu 2020-03-03  426                  
printk_ratelimited("%sF2FS-fs (%s): %s ZSTD_compressStream failed, ret: %d\n",
50cfa66f0de02e Chao Yu 2020-03-03  427                                  
KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03  428                                  
__func__, ZSTD_getErrorCode(ret));
50cfa66f0de02e Chao Yu 2020-03-03  429                  return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03  430          }
50cfa66f0de02e Chao Yu 2020-03-03  431  
50cfa66f0de02e Chao Yu 2020-03-03  432          if (dic->rlen != outbuf.pos) {
50cfa66f0de02e Chao Yu 2020-03-03 @433                  
printk_ratelimited("%sF2FS-fs (%s): %s ZSTD invalid rlen:%zu, "
50cfa66f0de02e Chao Yu 2020-03-03  434                                  
"expected:%lu\n", KERN_ERR,
50cfa66f0de02e Chao Yu 2020-03-03  435                                  
F2FS_I_SB(dic->inode)->sb->s_id,
50cfa66f0de02e Chao Yu 2020-03-03  436                                  
__func__, dic->rlen,
50cfa66f0de02e Chao Yu 2020-03-03  437                                  
PAGE_SIZE << dic->log_cluster_size);
50cfa66f0de02e Chao Yu 2020-03-03  438                  return -EIO;
50cfa66f0de02e Chao Yu 2020-03-03  439          }
50cfa66f0de02e Chao Yu 2020-03-03  440  
50cfa66f0de02e Chao Yu 2020-03-03  441          return 0;
50cfa66f0de02e Chao Yu 2020-03-03  442  }
50cfa66f0de02e Chao Yu 2020-03-03  443  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to