[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205170253.iHvYIuRG-lkp@intel.com>
Date: Tue, 17 May 2022 02:51:11 +0800
From: kernel test robot <lkp@...el.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [axboe-block:for-5.19/io_uring-pbuf 99/102] fs/io_uring.c:3470:35:
sparse: sparse: incorrect type in initializer (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.19/io_uring-pbuf
head: 5c7b7e4148d4c9c699b2af604822a012f026fc8f
commit: ed3ec408f289963ff22b5a9a783e4f211ed45b20 [99/102] io_uring: fix locking state for empty buffer group
config: sparc-randconfig-s031-20220516 (https://download.01.org/0day-ci/archive/20220517/202205170253.iHvYIuRG-lkp@intel.com/config)
compiler: sparc-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-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=ed3ec408f289963ff22b5a9a783e4f211ed45b20
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block for-5.19/io_uring-pbuf
git checkout ed3ec408f289963ff22b5a9a783e4f211ed45b20
# 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=sparc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> fs/io_uring.c:3470:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __user *ret @@ got void * @@
fs/io_uring.c:3470:35: sparse: expected void [noderef] __user *ret
fs/io_uring.c:3470:35: sparse: got void *
fs/io_uring.c:3500:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __user * @@ got void * @@
fs/io_uring.c:3500:31: sparse: expected void [noderef] __user *
fs/io_uring.c:3500:31: sparse: got void *
fs/io_uring.c:5255:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/io_uring.c:5255:14: sparse: expected struct file *file
fs/io_uring.c:5255:14: sparse: got struct file [noderef] __rcu *
fs/io_uring.c:6087:68: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] _key @@ got int apoll_events @@
fs/io_uring.c:6087:68: sparse: expected restricted __poll_t [usertype] _key
fs/io_uring.c:6087:68: sparse: got int apoll_events
fs/io_uring.c:6092:48: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6097:41: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6102:66: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got int @@
fs/io_uring.c:6102:66: sparse: expected restricted __poll_t [usertype] val
fs/io_uring.c:6102:66: sparse: got int
fs/io_uring.c:6102:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned short @@
fs/io_uring.c:6102:52: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:6102:52: sparse: got unsigned short
fs/io_uring.c:6108:50: 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:6108:50: sparse: expected signed int [usertype] res
fs/io_uring.c:6108:50: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:6145:68: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6145:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got unsigned int @@
fs/io_uring.c:6145:57: sparse: expected restricted __poll_t [usertype] val
fs/io_uring.c:6145:57: sparse: got unsigned int
fs/io_uring.c:6227:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6227:45: sparse: expected int events
fs/io_uring.c:6227:45: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6249:47: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6249:35: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6249:23: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6262:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:6262:40: sparse: expected int mask
fs/io_uring.c:6262:40: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:6262:50: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6262:50: sparse: expected int events
fs/io_uring.c:6262:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6354:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got restricted __poll_t [assigned] [usertype] mask @@
fs/io_uring.c:6354:24: sparse: expected int
fs/io_uring.c:6354:24: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6371: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:6371:40: sparse: expected int mask
fs/io_uring.c:6371:40: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6371:50: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6371:50: sparse: expected int events
fs/io_uring.c:6371:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6381:47: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6381:47: sparse: expected int events
fs/io_uring.c:6381:47: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6406:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got int @@
fs/io_uring.c:6406:33: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:6406:33: sparse: got int
fs/io_uring.c:6419:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6419:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:6419:22: sparse: right side has type int
fs/io_uring.c:6424:30: sparse: sparse: invalid assignment: &=
fs/io_uring.c:6424:30: sparse: left side has type restricted __poll_t
fs/io_uring.c:6424:30: sparse: right side has type int
fs/io_uring.c:6426:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6426:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:6426:22: sparse: right side has type int
fs/io_uring.c:6454: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:6454:33: sparse: expected int mask
fs/io_uring.c:6454:33: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:6454:50: sparse: sparse: incorrect type in argument 6 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6454:50: sparse: expected int events
fs/io_uring.c:6454:50: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6568:24: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6568:24: sparse: left side has type unsigned int
fs/io_uring.c:6568:24: sparse: right side has type restricted __poll_t
fs/io_uring.c:6569:65: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6569:29: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6569:38: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int @@
fs/io_uring.c:6569:38: sparse: expected restricted __poll_t
fs/io_uring.c:6569:38: sparse: got unsigned int
fs/io_uring.c:6617:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected int apoll_events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:6617:27: sparse: expected int apoll_events
fs/io_uring.c:6617:27: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:6656:43: sparse: sparse: invalid assignment: &=
fs/io_uring.c:6656:43: sparse: left side has type restricted __poll_t
fs/io_uring.c:6656:43: sparse: right side has type int
fs/io_uring.c:6657:62: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:6657:43: sparse: sparse: invalid assignment: |=
fs/io_uring.c:6657:43: sparse: left side has type restricted __poll_t
fs/io_uring.c:6657:43: sparse: right side has type unsigned int
fs/io_uring.c:2562:17: sparse: sparse: context imbalance in 'handle_prev_tw_list' - different lock contexts for basic block
fs/io_uring.c:7721:39: sparse: sparse: marked inline, but without a definition
fs/io_uring.c:7721:39: sparse: sparse: marked inline, but without a definition
fs/io_uring.c:7721:39: sparse: sparse: marked inline, but without a definition
fs/io_uring.c:7721:39: sparse: sparse: marked inline, but without a definition
vim +3470 fs/io_uring.c
3465
3466 static void __user *io_provided_buffer_select(struct io_kiocb *req, size_t *len,
3467 struct io_buffer_list *bl,
3468 unsigned int issue_flags)
3469 {
> 3470 void __user *ret = ERR_PTR(-ENOBUFS);
3471
3472 if (!list_empty(&bl->buf_list)) {
3473 struct io_buffer *kbuf;
3474
3475 kbuf = list_first_entry(&bl->buf_list, struct io_buffer, list);
3476 list_del(&kbuf->list);
3477 if (*len > kbuf->len)
3478 *len = kbuf->len;
3479 req->flags |= REQ_F_BUFFER_SELECTED;
3480 req->kbuf = kbuf;
3481 req->buf_index = kbuf->bid;
3482 ret = u64_to_user_ptr(kbuf->addr);
3483 }
3484
3485 io_ring_submit_unlock(req->ctx, issue_flags);
3486 return ret;
3487 }
3488
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists