From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here
Date: Tue, 05 May 2026 15:58:26 +0800 [thread overview]
Message-ID: <202605051516.EwH8GTl5-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git io_uring-user-acct.v2
head: 3db2fc5d524bb4877e39659d0180dfc0112893ac
commit: 3db2fc5d524bb4877e39659d0180dfc0112893ac [2/2] io_uring/rsrc: add huge page accounting for registered buffers
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260505/202605051516.EwH8GTl5-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260505/202605051516.EwH8GTl5-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/202605051516.EwH8GTl5-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here [-Wuninitialized]
52 | xa_store(&ctx->hpage_acct, key, xa_mk_value(count), GFP_KERNEL_ACCOUNT);
| ^~~~~
io_uring/rsrc.c:37:21: note: initialize the variable 'count' to silence this warning
37 | unsigned long count;
| ^
| = 0
1 warning generated.
vim +/count +52 io_uring/rsrc.c
29
30 static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
31 struct iovec *iov);
32
33 static int hpage_acct_ref(struct io_ring_ctx *ctx, struct page *hpage,
34 bool *acct_new)
35 {
36 unsigned long key = (unsigned long) hpage;
37 unsigned long count;
38 void *entry;
39 int ret;
40
41 lockdep_assert_held(&ctx->uring_lock);
42
43 entry = xa_load(&ctx->hpage_acct, key);
44 if (entry) {
45 *acct_new = false;
46 return 0;
47 }
48
49 ret = xa_reserve(&ctx->hpage_acct, key, GFP_KERNEL_ACCOUNT);
50 if (ret)
51 return ret;
> 52 xa_store(&ctx->hpage_acct, key, xa_mk_value(count), GFP_KERNEL_ACCOUNT);
53 *acct_new = true;
54 return 0;
55 }
56
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-05 7:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 7:58 kernel test robot [this message]
2026-05-05 8:03 ` [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2026-05-04 17:04 kernel test robot
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=202605051516.EwH8GTl5-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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