The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
@ 2025-12-12  1:09 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-12-12  1:09 UTC (permalink / raw)
  To: Pavel Begunkov; +Cc: oe-kbuild-all, linux-kernel, Jens Axboe

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d358e5254674b70f34c847715ca509e46eb81e6f
commit: 19a94da447f832ee614f8f5532d31c1c70061520 io_uring: consolidate drain seq checking
date:   7 months ago
config: i386-randconfig-061-20251211 (https://download.01.org/0day-ci/archive/20251212/202512120944.2Wp9or5n-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/20251212/202512120944.2Wp9or5n-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/202512120944.2Wp9or5n-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   io_uring/io_uring.c: note: in included file (through include/linux/io_uring/cmd.h):
   include/linux/io_uring_types.h:199:37: sparse: sparse: array of flexible structures
   io_uring/io_uring.c:566:28: sparse: sparse: invalid assignment: |=
   io_uring/io_uring.c:566:28: sparse:    left side has type bool
   io_uring/io_uring.c:566:28: sparse:    right side has type restricted io_req_flags_t
>> io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
   io_uring/io_uring.c:577:29: sparse: sparse: context imbalance in 'io_queue_deferred' - wrong count at exit
   io_uring/io_uring.c:612:36: sparse: sparse: context imbalance in 'io_req_post_cqe' - unexpected unlock
   io_uring/io_uring.c:614:17: sparse: sparse: context imbalance in '__io_submit_flush_completions' - different lock contexts for basic block
   io_uring/io_uring.c:2398:29: sparse: sparse: context imbalance in 'io_cqring_min_timer_wakeup' - different lock contexts for basic block

vim +1667 io_uring/io_uring.c

  1662	
  1663	static __cold void io_drain_req(struct io_kiocb *req)
  1664		__must_hold(&ctx->uring_lock)
  1665	{
  1666		struct io_ring_ctx *ctx = req->ctx;
> 1667		bool drain = req->flags & IOSQE_IO_DRAIN;
  1668		struct io_defer_entry *de;
  1669	
  1670		de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT);
  1671		if (!de) {
  1672			io_req_defer_failed(req, -ENOMEM);
  1673			return;
  1674		}
  1675	
  1676		io_prep_async_link(req);
  1677		trace_io_uring_defer(req);
  1678		de->req = req;
  1679		de->seq = io_get_sequence(req);
  1680	
  1681		scoped_guard(spinlock, &ctx->completion_lock) {
  1682			list_add_tail(&de->list, &ctx->defer_list);
  1683			__io_queue_deferred(ctx);
  1684			if (!drain && list_empty(&ctx->defer_list))
  1685				ctx->drain_active = false;
  1686		}
  1687	}
  1688	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
@ 2026-01-13 15:42 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-01-13 15:42 UTC (permalink / raw)
  To: Pavel Begunkov; +Cc: oe-kbuild-all, linux-kernel, Jens Axboe

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b71e635feefc852405b14620a7fc58c4c80c0f73
commit: 19a94da447f832ee614f8f5532d31c1c70061520 io_uring: consolidate drain seq checking
date:   8 months ago
config: i386-randconfig-061-20260113 (https://download.01.org/0day-ci/archive/20260113/202601132310.hT6ZSHAG-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260113/202601132310.hT6ZSHAG-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/202601132310.hT6ZSHAG-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   io_uring/io_uring.c: note: in included file (through include/linux/io_uring/cmd.h):
   include/linux/io_uring_types.h:199:37: sparse: sparse: array of flexible structures
   io_uring/io_uring.c:566:28: sparse: sparse: invalid assignment: |=
   io_uring/io_uring.c:566:28: sparse:    left side has type bool
   io_uring/io_uring.c:566:28: sparse:    right side has type restricted io_req_flags_t
>> io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
   io_uring/io_uring.c:577:29: sparse: sparse: context imbalance in 'io_queue_deferred' - wrong count at exit
   io_uring/io_uring.c:612:36: sparse: sparse: context imbalance in 'io_req_post_cqe' - unexpected unlock
   io_uring/io_uring.c:614:17: sparse: sparse: context imbalance in '__io_submit_flush_completions' - different lock contexts for basic block
   io_uring/io_uring.c:2398:29: sparse: sparse: context imbalance in 'io_cqring_min_timer_wakeup' - different lock contexts for basic block

vim +1667 io_uring/io_uring.c

  1662	
  1663	static __cold void io_drain_req(struct io_kiocb *req)
  1664		__must_hold(&ctx->uring_lock)
  1665	{
  1666		struct io_ring_ctx *ctx = req->ctx;
> 1667		bool drain = req->flags & IOSQE_IO_DRAIN;
  1668		struct io_defer_entry *de;
  1669	
  1670		de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT);
  1671		if (!de) {
  1672			io_req_defer_failed(req, -ENOMEM);
  1673			return;
  1674		}
  1675	
  1676		io_prep_async_link(req);
  1677		trace_io_uring_defer(req);
  1678		de->req = req;
  1679		de->seq = io_get_sequence(req);
  1680	
  1681		scoped_guard(spinlock, &ctx->completion_lock) {
  1682			list_add_tail(&de->list, &ctx->defer_list);
  1683			__io_queue_deferred(ctx);
  1684			if (!drain && list_empty(&ctx->defer_list))
  1685				ctx->drain_active = false;
  1686		}
  1687	}
  1688	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
@ 2026-02-16 12:40 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-02-16 12:40 UTC (permalink / raw)
  To: Pavel Begunkov; +Cc: oe-kbuild-all, linux-kernel, Jens Axboe

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f2acd3148e0ef42bdacbd477f90e8533f96b2ac
commit: 19a94da447f832ee614f8f5532d31c1c70061520 io_uring: consolidate drain seq checking
date:   9 months ago
config: alpha-randconfig-r134-20260216 (https://download.01.org/0day-ci/archive/20260216/202602162019.SvTi8Qes-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260216/202602162019.SvTi8Qes-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/202602162019.SvTi8Qes-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   io_uring/io_uring.c: note: in included file (through include/linux/io_uring/cmd.h):
   include/linux/io_uring_types.h:199:37: sparse: sparse: array of flexible structures
   io_uring/io_uring.c:566:28: sparse: sparse: invalid assignment: |=
   io_uring/io_uring.c:566:28: sparse:    left side has type bool
   io_uring/io_uring.c:566:28: sparse:    right side has type restricted io_req_flags_t
>> io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer
   io_uring/io_uring.c:577:29: sparse: sparse: context imbalance in 'io_queue_deferred' - wrong count at exit
   io_uring/io_uring.c:612:36: sparse: sparse: context imbalance in 'io_req_post_cqe' - unexpected unlock
   io_uring/io_uring.c:614:17: sparse: sparse: context imbalance in '__io_submit_flush_completions' - different lock contexts for basic block

vim +1667 io_uring/io_uring.c

  1662	
  1663	static __cold void io_drain_req(struct io_kiocb *req)
  1664		__must_hold(&ctx->uring_lock)
  1665	{
  1666		struct io_ring_ctx *ctx = req->ctx;
> 1667		bool drain = req->flags & IOSQE_IO_DRAIN;
  1668		struct io_defer_entry *de;
  1669	
  1670		de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT);
  1671		if (!de) {
  1672			io_req_defer_failed(req, -ENOMEM);
  1673			return;
  1674		}
  1675	
  1676		io_prep_async_link(req);
  1677		trace_io_uring_defer(req);
  1678		de->req = req;
  1679		de->seq = io_get_sequence(req);
  1680	
  1681		scoped_guard(spinlock, &ctx->completion_lock) {
  1682			list_add_tail(&de->list, &ctx->defer_list);
  1683			__io_queue_deferred(ctx);
  1684			if (!drain && list_empty(&ctx->defer_list))
  1685				ctx->drain_active = false;
  1686		}
  1687	}
  1688	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-16 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 12:40 io_uring/io_uring.c:1667:25: sparse: sparse: restricted io_req_flags_t degrades to integer kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-01-13 15:42 kernel test robot
2025-12-12  1:09 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