lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202212347.2BTScWAC-lkp@intel.com>
Date:   Mon, 21 Feb 2022 20:21:49 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Jens Axboe <axboe@...nel.dk>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:axboe/linux-block/perf-wip 5/17]
 drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol
 'page'.

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/perf-wip
head:   653193284c45da1c727d45de716d9b48b1019e66
commit: 97f573494a3c088d6e249ddccdbb238b3ea267e0 [5/17] block: add bvec_set_page() helper
config: arm-randconfig-m031-20220220 (https://download.01.org/0day-ci/archive/20220221/202202212347.2BTScWAC-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
drivers/md/bcache/util.c:256 bch_bio_map() error: uninitialized symbol 'page'.

vim +/page +256 drivers/md/bcache/util.c

169ef1cf6171d3 Kent Overstreet 2013-03-28  231  void bch_bio_map(struct bio *bio, void *base)
cafe563591446c Kent Overstreet 2013-03-23  232  {
4f024f3797c43c Kent Overstreet 2013-10-11  233  	size_t size = bio->bi_iter.bi_size;
cafe563591446c Kent Overstreet 2013-03-23  234  	struct bio_vec *bv = bio->bi_io_vec;
97f573494a3c08 Jens Axboe      2021-10-12  235  	unsigned int len, offset;
97f573494a3c08 Jens Axboe      2021-10-12  236  	struct page *page;
cafe563591446c Kent Overstreet 2013-03-23  237  
4f024f3797c43c Kent Overstreet 2013-10-11  238  	BUG_ON(!bio->bi_iter.bi_size);
cafe563591446c Kent Overstreet 2013-03-23  239  	BUG_ON(bio->bi_vcnt);
cafe563591446c Kent Overstreet 2013-03-23  240  
97f573494a3c08 Jens Axboe      2021-10-12  241  	offset = base ? offset_in_page(base) : 0;
cafe563591446c Kent Overstreet 2013-03-23  242  	goto start;
cafe563591446c Kent Overstreet 2013-03-23  243  
cafe563591446c Kent Overstreet 2013-03-23  244  	for (; size; bio->bi_vcnt++, bv++) {
97f573494a3c08 Jens Axboe      2021-10-12  245  		offset		= 0;
97f573494a3c08 Jens Axboe      2021-10-12  246  start:
97f573494a3c08 Jens Axboe      2021-10-12  247  		len		= min_t(size_t, PAGE_SIZE - offset, size);
cafe563591446c Kent Overstreet 2013-03-23  248  		if (base) {
97f573494a3c08 Jens Axboe      2021-10-12  249  			page = is_vmalloc_addr(base)
cafe563591446c Kent Overstreet 2013-03-23  250  				? vmalloc_to_page(base)
cafe563591446c Kent Overstreet 2013-03-23  251  				: virt_to_page(base);
cafe563591446c Kent Overstreet 2013-03-23  252  
97f573494a3c08 Jens Axboe      2021-10-12  253  			base += len;
cafe563591446c Kent Overstreet 2013-03-23  254  		}

No else path.

cafe563591446c Kent Overstreet 2013-03-23  255  
97f573494a3c08 Jens Axboe      2021-10-12 @256  		bvec_set_page(bv, page, len, offset);
                                                                                  ^^^^

97f573494a3c08 Jens Axboe      2021-10-12  257  		size -= len;
cafe563591446c Kent Overstreet 2013-03-23  258  	}
cafe563591446c Kent Overstreet 2013-03-23  259  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ