All of lore.kernel.org
 help / color / mirror / Atom feed
* io_uring/loop.c:50:3-9: preceding lock on line 67
@ 2026-06-05 12:53 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-06-05 12:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Pavel Begunkov <asml.silence@gmail.com>
CC: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ddd664bbff63e09e7a7f9acae9c43605d4cf185f
commit: 033af2b3eb19c5ed96825572105bca3611635ada io_uring: introduce callback driven main loop
date:   3 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 3 months ago
config: mips-randconfig-r063-20260604 (https://download.01.org/0day-ci/archive/20260605/202606052058.KpmWpKnd-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e5ab4f8a1f766febdc65ce89c00dec85393cfd68)

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
| Fixes: 033af2b3eb19 ("io_uring: introduce callback driven main loop")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202606052058.KpmWpKnd-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> io_uring/loop.c:50:3-9: preceding lock on line 67
   io_uring/loop.c:56:3-9: preceding lock on line 67
   io_uring/loop.c:70:3-9: preceding lock on line 67

vim +50 io_uring/loop.c

033af2b3eb19c5 Pavel Begunkov 2026-02-26  41  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  42  static int __io_run_loop(struct io_ring_ctx *ctx)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  43  {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  44  	struct iou_loop_params lp = {};
033af2b3eb19c5 Pavel Begunkov 2026-02-26  45  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  46  	while (true) {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  47  		int nr_wait, step_res;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  48  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  49  		if (unlikely(!ctx->loop_step))
033af2b3eb19c5 Pavel Begunkov 2026-02-26 @50  			return -EFAULT;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  51  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  52  		step_res = ctx->loop_step(ctx, &lp);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  53  		if (step_res == IOU_LOOP_STOP)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  54  			break;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  55  		if (step_res != IOU_LOOP_CONTINUE)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  56  			return -EINVAL;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  57  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  58  		nr_wait = io_loop_nr_cqes(ctx, &lp);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  59  		if (nr_wait > 0)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  60  			io_loop_wait(ctx, &lp, nr_wait);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  61  		else
033af2b3eb19c5 Pavel Begunkov 2026-02-26  62  			nr_wait = 0;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  63  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  64  		if (task_work_pending(current)) {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  65  			mutex_unlock(&ctx->uring_lock);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  66  			io_run_task_work();
033af2b3eb19c5 Pavel Begunkov 2026-02-26 @67  			mutex_lock(&ctx->uring_lock);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  68  		}
033af2b3eb19c5 Pavel Begunkov 2026-02-26  69  		if (unlikely(task_sigpending(current)))
033af2b3eb19c5 Pavel Begunkov 2026-02-26  70  			return -EINTR;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  71  		io_run_local_work_locked(ctx, nr_wait);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  72  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  73  		if (READ_ONCE(ctx->check_cq) & BIT(IO_CHECK_CQ_OVERFLOW_BIT))
033af2b3eb19c5 Pavel Begunkov 2026-02-26  74  			io_cqring_overflow_flush_locked(ctx);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  75  	}
033af2b3eb19c5 Pavel Begunkov 2026-02-26  76  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  77  	return 0;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  78  }
033af2b3eb19c5 Pavel Begunkov 2026-02-26  79  

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

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

* io_uring/loop.c:50:3-9: preceding lock on line 67
@ 2026-09-14 19:40 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-09-14 19:40 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Pavel Begunkov <asml.silence@gmail.com>
CC: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   587858367581b9c55c3690f4e63382ad622719d4
commit: 033af2b3eb19c5ed96825572105bca3611635ada io_uring: introduce callback driven main loop
date:   6 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 6 months ago
config: x86_64-randconfig-104-20260913 (https://download.01.org/0day-ci/archive/20260914/202609142107.e7PRqgG5-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

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
| Fixes: 033af2b3eb19 ("io_uring: introduce callback driven main loop")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202609142107.e7PRqgG5-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> io_uring/loop.c:50:3-9: preceding lock on line 67
   io_uring/loop.c:56:3-9: preceding lock on line 67
   io_uring/loop.c:70:3-9: preceding lock on line 67

vim +50 io_uring/loop.c

033af2b3eb19c5 Pavel Begunkov 2026-02-26  41  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  42  static int __io_run_loop(struct io_ring_ctx *ctx)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  43  {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  44  	struct iou_loop_params lp = {};
033af2b3eb19c5 Pavel Begunkov 2026-02-26  45  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  46  	while (true) {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  47  		int nr_wait, step_res;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  48  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  49  		if (unlikely(!ctx->loop_step))
033af2b3eb19c5 Pavel Begunkov 2026-02-26 @50  			return -EFAULT;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  51  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  52  		step_res = ctx->loop_step(ctx, &lp);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  53  		if (step_res == IOU_LOOP_STOP)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  54  			break;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  55  		if (step_res != IOU_LOOP_CONTINUE)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  56  			return -EINVAL;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  57  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  58  		nr_wait = io_loop_nr_cqes(ctx, &lp);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  59  		if (nr_wait > 0)
033af2b3eb19c5 Pavel Begunkov 2026-02-26  60  			io_loop_wait(ctx, &lp, nr_wait);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  61  		else
033af2b3eb19c5 Pavel Begunkov 2026-02-26  62  			nr_wait = 0;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  63  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  64  		if (task_work_pending(current)) {
033af2b3eb19c5 Pavel Begunkov 2026-02-26  65  			mutex_unlock(&ctx->uring_lock);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  66  			io_run_task_work();
033af2b3eb19c5 Pavel Begunkov 2026-02-26 @67  			mutex_lock(&ctx->uring_lock);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  68  		}
033af2b3eb19c5 Pavel Begunkov 2026-02-26  69  		if (unlikely(task_sigpending(current)))
033af2b3eb19c5 Pavel Begunkov 2026-02-26  70  			return -EINTR;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  71  		io_run_local_work_locked(ctx, nr_wait);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  72  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  73  		if (READ_ONCE(ctx->check_cq) & BIT(IO_CHECK_CQ_OVERFLOW_BIT))
033af2b3eb19c5 Pavel Begunkov 2026-02-26  74  			io_cqring_overflow_flush_locked(ctx);
033af2b3eb19c5 Pavel Begunkov 2026-02-26  75  	}
033af2b3eb19c5 Pavel Begunkov 2026-02-26  76  
033af2b3eb19c5 Pavel Begunkov 2026-02-26  77  	return 0;
033af2b3eb19c5 Pavel Begunkov 2026-02-26  78  }
033af2b3eb19c5 Pavel Begunkov 2026-02-26  79  

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

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

end of thread, other threads:[~2026-09-14 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 19:40 io_uring/loop.c:50:3-9: preceding lock on line 67 kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-05 12:53 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.