From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, fdmanana@kernel.org,
linux-btrfs@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] btrfs: use the btrfs_block_group_end() helper everywhere
Date: Mon, 19 Jan 2026 09:39:54 +0300 [thread overview]
Message-ID: <202601170636.WsePMV5H-lkp@intel.com> (raw)
In-Reply-To: <f7afa4b2c9350b08695cc34cd917dea3bf766bce.1768559305.git.fdmanana@suse.com>
Hi,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/fdmanana-kernel-org/btrfs-use-the-btrfs_block_group_end-helper-everywhere/20260116-183655
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link: https://lore.kernel.org/r/f7afa4b2c9350b08695cc34cd917dea3bf766bce.1768559305.git.fdmanana%40suse.com
patch subject: [PATCH] btrfs: use the btrfs_block_group_end() helper everywhere
config: alpha-randconfig-r072-20260117 (https://download.01.org/0day-ci/archive/20260117/202601170636.WsePMV5H-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 10.5.0
smatch version: v0.5.0-8985-g2614ff1a
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 <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202601170636.WsePMV5H-lkp@intel.com/
New smatch warnings:
fs/btrfs/free-space-cache.c:1207 write_pinned_extent_entries() warn: variable dereferenced before check 'block_group' (see line 1203)
vim +/block_group +1207 fs/btrfs/free-space-cache.c
6701bdb39ceb48 David Sterba 2019-03-20 1196 static noinline_for_stack int write_pinned_extent_entries(
6b45f64172e130 Nikolay Borisov 2020-01-20 1197 struct btrfs_trans_handle *trans,
32da5386d9a4fd David Sterba 2019-10-29 1198 struct btrfs_block_group *block_group,
4c6d1d85ad89fd Chris Mason 2015-04-06 1199 struct btrfs_io_ctl *io_ctl,
d4452bc526c431 Chris Mason 2014-05-19 1200 int *entries)
d4452bc526c431 Chris Mason 2014-05-19 1201 {
d4452bc526c431 Chris Mason 2014-05-19 1202 u64 start, extent_start, extent_end, len;
7fc5a6968403c7 Filipe Manana 2026-01-16 @1203 const u64 block_group_end = btrfs_block_group_end(block_group);
^^^^^^^^^^^^
Dereferenced.
d4452bc526c431 Chris Mason 2014-05-19 1204 struct extent_io_tree *unpin = NULL;
d4452bc526c431 Chris Mason 2014-05-19 1205 int ret;
43be21462d8c26 Josef Bacik 2011-04-01 1206
5349d6c3ffead2 Miao Xie 2014-06-19 @1207 if (!block_group)
^^^^^^^^^^^
Too late.
5349d6c3ffead2 Miao Xie 2014-06-19 1208 return 0;
5349d6c3ffead2 Miao Xie 2014-06-19 1209
43be21462d8c26 Josef Bacik 2011-04-01 1210 /*
43be21462d8c26 Josef Bacik 2011-04-01 1211 * We want to add any pinned extents to our free space cache
43be21462d8c26 Josef Bacik 2011-04-01 1212 * so we don't leak the space
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-19 6:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 10:32 [PATCH] btrfs: use the btrfs_block_group_end() helper everywhere fdmanana
2026-01-16 12:02 ` Johannes Thumshirn
2026-01-19 6:39 ` Dan Carpenter [this message]
2026-01-19 6:49 ` Johannes Thumshirn
2026-01-19 7:27 ` Dan Carpenter
2026-01-19 7:29 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202601170636.WsePMV5H-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox