* Re: [PATCH] erofs: Zstandard compression support
[not found] <20240508090346.2992116-1-hsiangkao@linux.alibaba.com>
@ 2024-05-08 19:12 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-08 19:12 UTC (permalink / raw)
To: Gao Xiang; +Cc: llvm, oe-kbuild-all
Hi Gao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on xiang-erofs/dev]
[also build test WARNING on next-20240508]
[cannot apply to xiang-erofs/dev-test xiang-erofs/fixes linus/master v6.9-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Gao-Xiang/erofs-Zstandard-compression-support/20240508-170754
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev
patch link: https://lore.kernel.org/r/20240508090346.2992116-1-hsiangkao%40linux.alibaba.com
patch subject: [PATCH] erofs: Zstandard compression support
config: arm64-randconfig-002-20240509 (https://download.01.org/0day-ci/archive/20240509/202405090343.ZIq0cRfw-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240509/202405090343.ZIq0cRfw-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405090343.ZIq0cRfw-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/erofs/decompressor_zstd.c:90:56: warning: variable 'dict_size' is uninitialized when used here [-Wuninitialized]
erofs_err(sb, "unsupported zstd dictionary size %u", dict_size);
^~~~~~~~~
fs/erofs/internal.h:30:39: note: expanded from macro 'erofs_err'
_erofs_err(sb, __func__, fmt "\n", ##__VA_ARGS__)
^~~~~~~~~~~
fs/erofs/decompressor_zstd.c:80:24: note: initialize the variable 'dict_size' to silence this warning
unsigned int dict_size, wkspsz;
^
= 0
1 warning generated.
vim +/dict_size +90 fs/erofs/decompressor_zstd.c
74
75 int z_erofs_load_zstd_config(struct super_block *sb,
76 struct erofs_super_block *dsb, void *data, int size)
77 {
78 static DEFINE_MUTEX(zstd_resize_mutex);
79 struct z_erofs_zstd_cfgs *zstd = data;
80 unsigned int dict_size, wkspsz;
81 struct z_erofs_zstd *strm, *head = NULL;
82 void *wksp;
83
84 if (!zstd || size < sizeof(struct z_erofs_zstd_cfgs) || zstd->format) {
85 erofs_err(sb, "unsupported zstd format, size=%u", size);
86 return -EINVAL;
87 }
88
89 if (zstd->windowlog > ilog2(Z_EROFS_ZSTD_MAX_DICT_SIZE) - 10) {
> 90 erofs_err(sb, "unsupported zstd dictionary size %u", dict_size);
91 return -EINVAL;
92 }
93 dict_size = 1U << (zstd->windowlog + 10);
94
95 /* in case 2 z_erofs_load_zstd_config() race to avoid deadlock */
96 mutex_lock(&zstd_resize_mutex);
97 if (z_erofs_zstd_max_dictsize >= dict_size) {
98 mutex_unlock(&zstd_resize_mutex);
99 return 0;
100 }
101
102 /* 1. collect/isolate all streams for the following check */
103 while (z_erofs_zstd_avail_strms) {
104 struct z_erofs_zstd *n;
105
106 for (strm = z_erofs_isolate_strms(true); strm; strm = n) {
107 n = strm->next;
108 strm->next = head;
109 head = strm;
110 --z_erofs_zstd_avail_strms;
111 }
112 }
113
114 /* 2. walk each isolated stream and grow max dict_size if needed */
115 wkspsz = zstd_dstream_workspace_bound(dict_size);
116 for (strm = head; strm; strm = strm->next) {
117 wksp = kvmalloc(wkspsz, GFP_KERNEL);
118 if (!wksp)
119 break;
120 kvfree(strm->wksp);
121 strm->wksp = wksp;
122 strm->wkspsz = wkspsz;
123 }
124
125 /* 3. push back all to the global list and update max dict_size */
126 spin_lock(&z_erofs_zstd_lock);
127 DBG_BUGON(z_erofs_zstd_head);
128 z_erofs_zstd_head = head;
129 spin_unlock(&z_erofs_zstd_lock);
130 z_erofs_zstd_avail_strms = z_erofs_zstd_nstrms;
131 wake_up_all(&z_erofs_zstd_wq);
132 if (!strm)
133 z_erofs_zstd_max_dictsize = dict_size;
134 mutex_unlock(&zstd_resize_mutex);
135 return strm ? -ENOMEM : 0;
136 }
137
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-08 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240508090346.2992116-1-hsiangkao@linux.alibaba.com>
2024-05-08 19:12 ` [PATCH] erofs: Zstandard compression support kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox