From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: io_uring/loop.c:50:3-9: preceding lock on line 67
Date: Mon, 14 Sep 2026 21:40:52 +0200 [thread overview]
Message-ID: <202609142107.e7PRqgG5-lkp@intel.com> (raw)
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
next reply other threads:[~2026-09-14 19:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 19:40 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-05 12:53 io_uring/loop.c:50:3-9: preceding lock on line 67 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=202609142107.e7PRqgG5-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--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 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.