From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [axboe:io_uring-thread-handoff.2 11/15] io_uring/io_uring.c:2828 __do_sys_io_uring_enter() warn: inconsistent returns '&ctx->uring_lock'.
Date: Thu, 10 Sep 2026 07:37:56 +0800 [thread overview]
Message-ID: <202609100721.uX7gYHFt-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jens Axboe <axboe@kernel.dk>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git io_uring-thread-handoff.2
head: 360bd4c7bd75c8edf89050b3f5820552176ae462
commit: 4aa11821fdac6420f0c73596c2537e56064d7b2d [11/15] io_uring: enable handing submitter identity to an io-wq worker
:::::: branch date: 9 hours ago
:::::: commit date: 32 hours ago
config: parisc-randconfig-r071-20260910 (https://download.01.org/0day-ci/archive/20260910/202609100721.uX7gYHFt-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.4.0
smatch: v0.5.0-9187-g5189e3fb
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202609100721.uX7gYHFt-lkp@intel.com/
smatch warnings:
io_uring/io_uring.c:2828 __do_sys_io_uring_enter() warn: inconsistent returns '&ctx->uring_lock'.
io_uring/io_uring.c:2828 __do_sys_io_uring_enter() warn: inconsistent returns '&ctx->uring_lock'.
vim +2828 io_uring/io_uring.c
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2752
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2753 SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2754 u32, min_complete, u32, flags, const void __user *, argp,
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2755 size_t, argsz)
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2756 {
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2757 struct io_ring_ctx *ctx;
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2758 struct file *file;
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2759 long ret;
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2760
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2761 if (unlikely(flags & ~IORING_ENTER_FLAGS))
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2762 return -EINVAL;
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2763
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2764 file = io_uring_ctx_get_file(fd, flags & IORING_ENTER_REGISTERED_RING);
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2765 if (IS_ERR(file))
c5e9f6a96bf7379 io_uring/io_uring.c Jens Axboe 2026-04-08 2766 return PTR_ERR(file);
73363c262d6a7d2 io_uring/io_uring.c Jens Axboe 2023-11-28 2767 ctx = file->private_data;
7e84e1c7566a1df fs/io_uring.c Stefano Garzarella 2020-08-27 2768 ret = -EBADFD;
7a8737e1132ff07 io_uring/io_uring.c Caleb Sander Mateos 2026-01-05 2769 /*
7a8737e1132ff07 io_uring/io_uring.c Caleb Sander Mateos 2026-01-05 2770 * Keep IORING_SETUP_R_DISABLED check before submitter_task load
7a8737e1132ff07 io_uring/io_uring.c Caleb Sander Mateos 2026-01-05 2771 * in io_uring_add_tctx_node() -> __io_uring_add_tctx_node_from_submit()
7a8737e1132ff07 io_uring/io_uring.c Caleb Sander Mateos 2026-01-05 2772 */
7a8737e1132ff07 io_uring/io_uring.c Caleb Sander Mateos 2026-01-05 2773 if (unlikely(smp_load_acquire(&ctx->flags) & IORING_SETUP_R_DISABLED))
7e84e1c7566a1df fs/io_uring.c Stefano Garzarella 2020-08-27 2774 goto out;
7e84e1c7566a1df fs/io_uring.c Stefano Garzarella 2020-08-27 2775
033af2b3eb19c5e io_uring/io_uring.c Pavel Begunkov 2026-02-26 2776 if (io_has_loop_ops(ctx)) {
033af2b3eb19c5e io_uring/io_uring.c Pavel Begunkov 2026-02-26 2777 ret = io_run_loop(ctx);
033af2b3eb19c5e io_uring/io_uring.c Pavel Begunkov 2026-02-26 2778 goto out;
033af2b3eb19c5e io_uring/io_uring.c Pavel Begunkov 2026-02-26 2779 }
033af2b3eb19c5e io_uring/io_uring.c Pavel Begunkov 2026-02-26 2780
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2781 /*
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2782 * For SQ polling, the thread will do all submissions and completions.
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2783 * Just return the requested submit count, and wake the thread if
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2784 * we were asked to.
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2785 */
b2a9eadab857309 fs/io_uring.c Jens Axboe 2019-09-12 2786 ret = 0;
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2787 if (ctx->flags & IORING_SETUP_SQPOLL) {
21f965221e7c426 fs/io_uring.c Jens Axboe 2021-08-14 2788 if (unlikely(ctx->sq_data->thread == NULL)) {
041474885e9707a fs/io_uring.c Stefan Metzmacher 2021-03-07 2789 ret = -EOWNERDEAD;
5f3f26f98ae484a fs/io_uring.c Jens Axboe 2021-02-25 2790 goto out;
21f965221e7c426 fs/io_uring.c Jens Axboe 2021-08-14 2791 }
6c271ce2f1d572f fs/io_uring.c Jens Axboe 2019-01-10 2792 if (flags & IORING_ENTER_SQ_WAKEUP)
534ca6d684f1fea fs/io_uring.c Jens Axboe 2020-09-02 2793 wake_up(&ctx->sq_data->wait);
88b80534f60f5dd io_uring/io_uring.c Quanfa Fu 2023-01-15 2794 if (flags & IORING_ENTER_SQ_WAIT)
88b80534f60f5dd io_uring/io_uring.c Quanfa Fu 2023-01-15 2795 io_sqpoll_wait_sq(ctx);
88b80534f60f5dd io_uring/io_uring.c Quanfa Fu 2023-01-15 2796
3e813c9026720c1 fs/io_uring.c Dylan Yudaken 2022-04-21 2797 ret = to_submit;
b2a9eadab857309 fs/io_uring.c Jens Axboe 2019-09-12 2798 } else if (to_submit) {
eef51daa72f745b fs/io_uring.c Pavel Begunkov 2021-06-14 2799 ret = io_uring_add_tctx_node(ctx);
0f2122045b94624 fs/io_uring.c Jens Axboe 2020-09-13 2800 if (unlikely(ret))
0f2122045b94624 fs/io_uring.c Jens Axboe 2020-09-13 2801 goto out;
d487b43cd3276e4 fs/io_uring.c Pavel Begunkov 2022-03-22 2802
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2803 io_handoff_enter(file, to_submit, min_complete, flags, argp,
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2804 argsz);
2b188cc1bb857a9 fs/io_uring.c Jens Axboe 2019-01-07 2805 mutex_lock(&ctx->uring_lock);
3e813c9026720c1 fs/io_uring.c Dylan Yudaken 2022-04-21 2806 ret = io_submit_sqes(ctx, to_submit);
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2807 /*
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2808 * A blocked issue handed our identity to a worker which
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2809 * finishes this syscall; the file ref went with it.
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2810 */
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2811 if (unlikely(ret == -EIOCBQUEUED))
4aa11821fdac642 io_uring/io_uring.c Jens Axboe 2026-08-30 2812 return io_uring_handoff_worker();
3e813c9026720c1 fs/io_uring.c Dylan Yudaken 2022-04-21 2813 if (ret != to_submit) {
2b188cc1bb857a9 fs/io_uring.c Jens Axboe 2019-01-07 2814 mutex_unlock(&ctx->uring_lock);
7c504e65206a437 fs/io_uring.c Pavel Begunkov 2019-12-18 2815 goto out;
2b188cc1bb857a9 fs/io_uring.c Jens Axboe 2019-01-07 2816 }
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2817 ret = io_uring_enter_finish(ctx, ret, min_complete, flags,
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2818 argp, argsz);
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2819 goto out;
3e813c9026720c1 fs/io_uring.c Dylan Yudaken 2022-04-21 2820 }
c73ebb685fb6dfb fs/io_uring.c Hao Xu 2020-11-03 2821
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2822 if (flags & IORING_ENTER_GETEVENTS)
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2823 ret = io_uring_getevents(ctx, ret, min_complete, flags, argp,
1eff5d7b2f1d289 io_uring/io_uring.c Jens Axboe 2026-08-30 2824 argsz);
7c504e65206a437 fs/io_uring.c Pavel Begunkov 2019-12-18 2825 out:
73363c262d6a7d2 io_uring/io_uring.c Jens Axboe 2023-11-28 2826 if (!(flags & IORING_ENTER_REGISTERED_RING))
73363c262d6a7d2 io_uring/io_uring.c Jens Axboe 2023-11-28 2827 fput(file);
3e813c9026720c1 fs/io_uring.c Dylan Yudaken 2022-04-21 @2828 return ret;
2b188cc1bb857a9 fs/io_uring.c Jens Axboe 2019-01-07 2829 }
2b188cc1bb857a9 fs/io_uring.c Jens Axboe 2019-01-07 2830
:::::: The code at line 2828 was first introduced by commit
:::::: 3e813c9026720c1291ef3c91caa2e26f88e28367 io_uring: rework io_uring_enter to simplify return value
:::::: TO: Dylan Yudaken <dylany@fb.com>
:::::: CC: Jens Axboe <axboe@kernel.dk>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-09 23:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202609100721.uX7gYHFt-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--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.