* [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here
@ 2026-05-04 17:04 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-05-04 17:04 UTC (permalink / raw)
To: Jens Axboe; +Cc: llvm, oe-kbuild-all
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: x86_64-kexec (https://download.01.org/0day-ci/archive/20260504/202605041900.orqOdsuT-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260504/202605041900.orqOdsuT-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/202605041900.orqOdsuT-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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here
@ 2026-05-05 7:58 kernel test robot
2026-05-05 8:03 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-05-05 7:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: llvm, oe-kbuild-all
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here
2026-05-05 7:58 [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here kernel test robot
@ 2026-05-05 8:03 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-05-05 8:03 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all
On 5/5/26 1:58 AM, kernel test robot wrote:
> 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.
This one is already fixed in the current tree.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-05 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 7:58 [axboe:io_uring-user-acct.v2 2/2] io_uring/rsrc.c:52:46: warning: variable 'count' is uninitialized when used here kernel test robot
2026-05-05 8:03 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2026-05-04 17:04 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox