[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207021942.erAJXKL7-lkp@intel.com>
Date: Sat, 2 Jul 2022 19:57:17 +0800
From: kernel test robot <lkp@...el.com>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: kbuild-all@...ts.01.org,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: [ammarfaizi2-block:axboe/linux-block/tw-test 21/69]
fs/io_uring.c:5877:66: sparse: sparse: incorrect type in argument 1
(different base types)
tree: https://github.com/ammarfaizi2/linux-block axboe/linux-block/tw-test
head: e5b6516251a2c7ef733eefa2cd02488235333d84
commit: 5dedbb47888fe7cd7872af9d4ec7ed30f821c831 [21/69] io_uring: explicitly keep a CQE in io_kiocb
config: alpha-randconfig-s032-20220629 (https://download.01.org/0day-ci/archive/20220702/202207021942.erAJXKL7-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/ammarfaizi2/linux-block/commit/5dedbb47888fe7cd7872af9d4ec7ed30f821c831
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block axboe/linux-block/tw-test
git checkout 5dedbb47888fe7cd7872af9d4ec7ed30f821c831
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
fs/io_uring.c:3199:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags @@ got restricted __kernel_rwf_t @@
fs/io_uring.c:3199:23: sparse: expected unsigned int [usertype] flags
fs/io_uring.c:3199:23: sparse: got restricted __kernel_rwf_t
fs/io_uring.c:3396:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __user * @@ got struct io_buffer *[assigned] kbuf @@
fs/io_uring.c:3396:24: sparse: expected void [noderef] __user *
fs/io_uring.c:3396:24: sparse: got struct io_buffer *[assigned] kbuf
fs/io_uring.c:3783:48: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __kernel_rwf_t [usertype] flags @@ got unsigned int [usertype] flags @@
fs/io_uring.c:3783:48: sparse: expected restricted __kernel_rwf_t [usertype] flags
fs/io_uring.c:3783:48: sparse: got unsigned int [usertype] flags
fs/io_uring.c:5102:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/io_uring.c:5102:14: sparse: expected struct file *file
fs/io_uring.c:5102:14: sparse: got struct file [noderef] __rcu *
fs/io_uring.c:5867:68: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] _key @@ got int apoll_events @@
fs/io_uring.c:5867:68: sparse: expected restricted __poll_t [usertype] _key
fs/io_uring.c:5867:68: sparse: got int apoll_events
fs/io_uring.c:5872:48: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:5876:59: sparse: sparse: restricted __poll_t degrades to integer
>> fs/io_uring.c:5877:66: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got int @@
fs/io_uring.c:5877:66: sparse: expected restricted __poll_t [usertype] val
fs/io_uring.c:5877:66: sparse: got int
fs/io_uring.c:5877:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned short @@
fs/io_uring.c:5877:52: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:5877:52: sparse: got unsigned short
fs/io_uring.c:5881:75: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected signed int [usertype] res @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:5881:75: sparse: expected signed int [usertype] res
fs/io_uring.c:5881:75: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:5911:68: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:5911:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got unsigned int @@
fs/io_uring.c:5911:57: sparse: expected restricted __poll_t [usertype] val
fs/io_uring.c:5911:57: sparse: got unsigned int
fs/io_uring.c:5992:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:5992:45: sparse: expected int events
fs/io_uring.c:5992:45: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6027:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:6027:40: sparse: expected int mask
fs/io_uring.c:6027:40: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:6027:50: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6027:50: sparse: expected int events
fs/io_uring.c:6027:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6118:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got restricted __poll_t [assigned] [usertype] mask @@
fs/io_uring.c:6118:24: sparse: expected int
fs/io_uring.c:6118:24: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6135:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@
fs/io_uring.c:6135:40: sparse: expected int mask
fs/io_uring.c:6135:40: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6135:50: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6135:50: sparse: expected int events
fs/io_uring.c:6135:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6145:47: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6145:47: sparse: expected int events
fs/io_uring.c:6145:47: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6170:25: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6170:48: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int @@
fs/io_uring.c:6170:48: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:6170:48: sparse: got unsigned int
fs/io_uring.c:6179:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6179:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:6179:22: sparse: right side has type int
fs/io_uring.c:6184:30: sparse: sparse: invalid assignment: &=
fs/io_uring.c:6184:30: sparse: left side has type restricted __poll_t
fs/io_uring.c:6184:30: sparse: right side has type int
fs/io_uring.c:6186:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6186:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:6186:22: sparse: right side has type int
fs/io_uring.c:6212:33: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@
fs/io_uring.c:6212:33: sparse: expected int mask
fs/io_uring.c:6212:33: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6212:50: sparse: sparse: incorrect type in argument 6 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6212:50: sparse: expected int events
fs/io_uring.c:6212:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6294:24: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6294:24: sparse: left side has type unsigned int
fs/io_uring.c:6294:24: sparse: right side has type restricted __poll_t
fs/io_uring.c:6295:65: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6295:29: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6295:38: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int @@
fs/io_uring.c:6295:38: sparse: expected restricted __poll_t
fs/io_uring.c:6295:38: sparse: got unsigned int
fs/io_uring.c:6347:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected int apoll_events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6347:27: sparse: expected int apoll_events
fs/io_uring.c:6347:27: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6385:43: sparse: sparse: invalid assignment: &=
fs/io_uring.c:6385:43: sparse: left side has type restricted __poll_t
fs/io_uring.c:6385:43: sparse: right side has type int
fs/io_uring.c:6386:62: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6386:43: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6386:43: sparse: left side has type restricted __poll_t
fs/io_uring.c:6386:43: sparse: right side has type unsigned int
fs/io_uring.c:2451:17: sparse: sparse: context imbalance in 'handle_prev_tw_list' - different lock contexts for basic block
fs/io_uring.c:7396:39: sparse: sparse: marked inline, but without a definition
fs/io_uring.c:7396:39: sparse: sparse: marked inline, but without a definition
fs/io_uring.c:7396:39: sparse: sparse: marked inline, but without a definition
vim +5877 fs/io_uring.c
5839
5840 /*
5841 * All poll tw should go through this. Checks for poll events, manages
5842 * references, does rewait, etc.
5843 *
5844 * Returns a negative error on failure. >0 when no action require, which is
5845 * either spurious wakeup or multishot CQE is served. 0 when it's done with
5846 * the request, then the mask is stored in req->cqe.res.
5847 */
5848 static int io_poll_check_events(struct io_kiocb *req, bool locked)
5849 {
5850 struct io_ring_ctx *ctx = req->ctx;
5851 int v;
5852
5853 /* req->task == current here, checking PF_EXITING is safe */
5854 if (unlikely(req->task->flags & PF_EXITING))
5855 io_poll_mark_cancelled(req);
5856
5857 do {
5858 v = atomic_read(&req->poll_refs);
5859
5860 /* tw handler should be the owner, and so have some references */
5861 if (WARN_ON_ONCE(!(v & IO_POLL_REF_MASK)))
5862 return 0;
5863 if (v & IO_POLL_CANCEL_FLAG)
5864 return -ECANCELED;
5865
5866 if (!req->cqe.res) {
5867 struct poll_table_struct pt = { ._key = req->apoll_events };
5868 unsigned flags = locked ? 0 : IO_URING_F_UNLOCKED;
5869
5870 if (unlikely(!io_assign_file(req, flags)))
5871 return -EBADF;
5872 req->cqe.res = vfs_poll(req->file, &pt) & req->apoll_events;
5873 }
5874
5875 /* multishot, just fill an CQE and proceed */
5876 if (req->cqe.res && !(req->apoll_events & EPOLLONESHOT)) {
> 5877 __poll_t mask = mangle_poll(req->cqe.res & req->apoll_events);
5878 bool filled;
5879
5880 spin_lock(&ctx->completion_lock);
5881 filled = io_fill_cqe_aux(ctx, req->cqe.user_data, mask,
5882 IORING_CQE_F_MORE);
5883 io_commit_cqring(ctx);
5884 spin_unlock(&ctx->completion_lock);
5885 if (unlikely(!filled))
5886 return -ECANCELED;
5887 io_cqring_ev_posted(ctx);
5888 } else if (req->cqe.res) {
5889 return 0;
5890 }
5891
5892 /*
5893 * Release all references, retry if someone tried to restart
5894 * task_work while we were executing it.
5895 */
5896 } while (atomic_sub_return(v & IO_POLL_REF_MASK, &req->poll_refs));
5897
5898 return 1;
5899 }
5900
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists