All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android15-6.6 5/5] block/blk.h:344 bio_may_exceed_limits() error: we previously assumed 'bio->bi_io_vec' could be null (see line 340)
@ 2026-02-11 10:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-02-11 10:47 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com

tree:   https://android.googlesource.com/kernel/common android15-6.6
head:   8eed14b3df122c0b89590e49aa75187aac86d3ba
commit: e2bd6241b810c128e5fcc8ed4cd6fa281c0f00b4 [5/5] ANDROID: block: Add support for filesystem requests and small segments
:::::: branch date: 6 hours ago
:::::: commit date: 1 year, 11 months ago
config: i386-randconfig-r071-20260211 (https://download.01.org/0day-ci/archive/20260211/202602111857.2fZ5GeZz-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch version: v0.5.0-8994-gd50c5a4c

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202602111857.2fZ5GeZz-lkp@intel.com/

smatch warnings:
block/blk.h:344 bio_may_exceed_limits() error: we previously assumed 'bio->bi_io_vec' could be null (see line 340)

vim +344 block/blk.h

83d016ac86428d Bart Van Assche   2018-01-17  309  
3ad5cee5cd000d Christoph Hellwig 2020-03-24  310  ssize_t part_size_show(struct device *dev, struct device_attribute *attr,
3ad5cee5cd000d Christoph Hellwig 2020-03-24  311  		char *buf);
3ad5cee5cd000d Christoph Hellwig 2020-03-24  312  ssize_t part_stat_show(struct device *dev, struct device_attribute *attr,
3ad5cee5cd000d Christoph Hellwig 2020-03-24  313  		char *buf);
3ad5cee5cd000d Christoph Hellwig 2020-03-24  314  ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr,
3ad5cee5cd000d Christoph Hellwig 2020-03-24  315  		char *buf);
3ad5cee5cd000d Christoph Hellwig 2020-03-24  316  ssize_t part_fail_show(struct device *dev, struct device_attribute *attr,
3ad5cee5cd000d Christoph Hellwig 2020-03-24  317  		char *buf);
3ad5cee5cd000d Christoph Hellwig 2020-03-24  318  ssize_t part_fail_store(struct device *dev, struct device_attribute *attr,
3ad5cee5cd000d Christoph Hellwig 2020-03-24  319  		const char *buf, size_t count);
581d4e28d9195a Jens Axboe        2008-09-14  320  ssize_t part_timeout_show(struct device *, struct device_attribute *, char *);
581d4e28d9195a Jens Axboe        2008-09-14  321  ssize_t part_timeout_store(struct device *, struct device_attribute *,
581d4e28d9195a Jens Axboe        2008-09-14  322  				const char *, size_t);
581d4e28d9195a Jens Axboe        2008-09-14  323  
c55ddd9082f757 Christoph Hellwig 2022-07-27  324  static inline bool bio_may_exceed_limits(struct bio *bio,
aa261f20589d89 Bart Van Assche   2022-10-25  325  					 const struct queue_limits *lim)
abd45c159df5fc Jens Axboe        2021-10-13  326  {
abd45c159df5fc Jens Axboe        2021-10-13  327  	switch (bio_op(bio)) {
abd45c159df5fc Jens Axboe        2021-10-13  328  	case REQ_OP_DISCARD:
abd45c159df5fc Jens Axboe        2021-10-13  329  	case REQ_OP_SECURE_ERASE:
abd45c159df5fc Jens Axboe        2021-10-13  330  	case REQ_OP_WRITE_ZEROES:
abd45c159df5fc Jens Axboe        2021-10-13  331  		return true; /* non-trivial splitting decisions */
abd45c159df5fc Jens Axboe        2021-10-13  332  	default:
abd45c159df5fc Jens Axboe        2021-10-13  333  		break;
abd45c159df5fc Jens Axboe        2021-10-13  334  	}
abd45c159df5fc Jens Axboe        2021-10-13  335  
abd45c159df5fc Jens Axboe        2021-10-13  336  	/*
e2bd6241b810c1 Bart Van Assche   2023-06-12  337  	 * Check whether bio splitting should be performed. This check may
e2bd6241b810c1 Bart Van Assche   2023-06-12  338  	 * trigger the bio splitting code even if splitting is not necessary.
abd45c159df5fc Jens Axboe        2021-10-13  339  	 */
e2bd6241b810c1 Bart Van Assche   2023-06-12 @340  	if (blk_queue_sub_page_limits(lim) && bio->bi_io_vec &&
e2bd6241b810c1 Bart Van Assche   2023-06-12  341  	    bio->bi_io_vec->bv_len > lim->max_segment_size)
e2bd6241b810c1 Bart Van Assche   2023-06-12  342  		return true;
c55ddd9082f757 Christoph Hellwig 2022-07-27  343  	return lim->chunk_sectors || bio->bi_vcnt != 1 ||
abd45c159df5fc Jens Axboe        2021-10-13 @344  		bio->bi_io_vec->bv_len + bio->bi_io_vec->bv_offset > PAGE_SIZE;
abd45c159df5fc Jens Axboe        2021-10-13  345  }
abd45c159df5fc Jens Axboe        2021-10-13  346  

:::::: The code at line 344 was first introduced by commit
:::::: abd45c159df5fcb7ac820e2825dac85de7c01c21 block: handle fast path of bio splitting inline

:::::: TO: Jens Axboe <axboe@kernel.dk>
:::::: CC: Jens Axboe <axboe@kernel.dk>

-- 
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:[~2026-02-11 10:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 10:47 [android-common:android15-6.6 5/5] block/blk.h:344 bio_may_exceed_limits() error: we previously assumed 'bio->bi_io_vec' could be null (see line 340) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.