CC: [email protected] CC: [email protected] TO: Daeho Jeong <[email protected]> CC: Jaegeuk Kim <[email protected]> CC: Chao Yu <[email protected]>, Chao Yu <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test head: 80edc614b5c78ce37985f0f36c104b16631c85ff commit: a4b6817625e71d5d4aee16cacf7a7fec077c6dbe [36/40] f2fs: introduce periodic iostat io latency traces :::::: branch date: 18 hours ago :::::: commit date: 18 hours ago config: i386-randconfig-m021-20210824 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 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/iostat.c:210 __update_iostat_latency() error: buffer overflow 'io_lat->sum_lat[idx]' 3 <= 3 fs/f2fs/iostat.c:211 __update_iostat_latency() error: buffer overflow 'io_lat->bio_cnt[idx]' 3 <= 3 fs/f2fs/iostat.c:212 __update_iostat_latency() error: buffer overflow 'io_lat->peak_lat[idx]' 3 <= 3 Old smatch warnings: fs/f2fs/iostat.c:213 __update_iostat_latency() error: buffer overflow 'io_lat->peak_lat[idx]' 3 <= 3 vim +210 fs/f2fs/iostat.c 521187439abfb3 Daeho Jeong 2021-08-19 182 a4b6817625e71d Daeho Jeong 2021-08-20 183 static inline void __update_iostat_latency(struct bio_iostat_ctx *iostat_ctx, a4b6817625e71d Daeho Jeong 2021-08-20 184 int rw, bool is_sync) a4b6817625e71d Daeho Jeong 2021-08-20 185 { a4b6817625e71d Daeho Jeong 2021-08-20 186 unsigned long ts_diff; a4b6817625e71d Daeho Jeong 2021-08-20 187 unsigned int iotype = iostat_ctx->type; a4b6817625e71d Daeho Jeong 2021-08-20 188 unsigned long flags; a4b6817625e71d Daeho Jeong 2021-08-20 189 struct f2fs_sb_info *sbi = iostat_ctx->sbi; a4b6817625e71d Daeho Jeong 2021-08-20 190 struct iostat_lat_info *io_lat = sbi->iostat_io_lat; a4b6817625e71d Daeho Jeong 2021-08-20 191 int idx; a4b6817625e71d Daeho Jeong 2021-08-20 192 a4b6817625e71d Daeho Jeong 2021-08-20 193 if (!sbi->iostat_enable) a4b6817625e71d Daeho Jeong 2021-08-20 194 return; a4b6817625e71d Daeho Jeong 2021-08-20 195 a4b6817625e71d Daeho Jeong 2021-08-20 196 ts_diff = jiffies - iostat_ctx->submit_ts; a4b6817625e71d Daeho Jeong 2021-08-20 197 if (iotype >= META_FLUSH) a4b6817625e71d Daeho Jeong 2021-08-20 198 iotype = META; a4b6817625e71d Daeho Jeong 2021-08-20 199 a4b6817625e71d Daeho Jeong 2021-08-20 200 if (rw == 0) { a4b6817625e71d Daeho Jeong 2021-08-20 201 idx = READ_IO; a4b6817625e71d Daeho Jeong 2021-08-20 202 } else { a4b6817625e71d Daeho Jeong 2021-08-20 203 if (is_sync) a4b6817625e71d Daeho Jeong 2021-08-20 204 idx = WRITE_SYNC_IO; a4b6817625e71d Daeho Jeong 2021-08-20 205 else a4b6817625e71d Daeho Jeong 2021-08-20 206 idx = WRITE_ASYNC_IO; a4b6817625e71d Daeho Jeong 2021-08-20 207 } a4b6817625e71d Daeho Jeong 2021-08-20 208 a4b6817625e71d Daeho Jeong 2021-08-20 209 spin_lock_irqsave(&sbi->iostat_lat_lock, flags); a4b6817625e71d Daeho Jeong 2021-08-20 @210 io_lat->sum_lat[idx][iotype] += ts_diff; a4b6817625e71d Daeho Jeong 2021-08-20 @211 io_lat->bio_cnt[idx][iotype]++; a4b6817625e71d Daeho Jeong 2021-08-20 @212 if (ts_diff > io_lat->peak_lat[idx][iotype]) a4b6817625e71d Daeho Jeong 2021-08-20 213 io_lat->peak_lat[idx][iotype] = ts_diff; a4b6817625e71d Daeho Jeong 2021-08-20 214 spin_unlock_irqrestore(&sbi->iostat_lat_lock, flags); a4b6817625e71d Daeho Jeong 2021-08-20 215 } a4b6817625e71d Daeho Jeong 2021-08-20 216 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
