tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 19ae1f2bd9c091059f80646604ccef8a1e614f57 commit: 9123c8ffce1610323ec9c0874fa0262353f41fc3 [9208/10007] io_uring: add helpers for 2 level table alloc config: mips-randconfig-s031-20210615 (attached as .config) compiler: mips-linux-gcc (GCC) 9.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.3-341-g8af24329-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9123c8ffce1610323ec9c0874fa0262353f41fc3 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 9123c8ffce1610323ec9c0874fa0262353f41fc3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) command-line: note: in included file: builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined builtin:0:0: sparse: this was the original definition fs/io_uring.c:2921: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:2921:24: sparse: expected void [noderef] __user * fs/io_uring.c:2921:24: sparse: got struct io_buffer *[assigned] kbuf fs/io_uring.c:4228:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@ fs/io_uring.c:4228:14: sparse: expected struct file *file fs/io_uring.c:4228:14: sparse: got struct file [noderef] __rcu * fs/io_uring.c:4833:72: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@ fs/io_uring.c:4833:72: sparse: expected int mask fs/io_uring.c:4833:72: sparse: got restricted __poll_t [usertype] mask fs/io_uring.c:4837:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t [usertype] mask @@ fs/io_uring.c:4837:21: sparse: expected unsigned int [usertype] result fs/io_uring.c:4837:21: sparse: got restricted __poll_t [usertype] mask fs/io_uring.c:4862:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t @@ fs/io_uring.c:4862:29: sparse: expected unsigned int [usertype] result fs/io_uring.c:4862:29: sparse: got restricted __poll_t fs/io_uring.c:4946:49: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int [usertype] result @@ fs/io_uring.c:4946:49: sparse: expected restricted __poll_t [usertype] mask fs/io_uring.c:4946:49: sparse: got unsigned int [usertype] result fs/io_uring.c:5098:41: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] @@ fs/io_uring.c:5098:41: sparse: expected int mask fs/io_uring.c:5098:41: sparse: got restricted __poll_t [usertype] fs/io_uring.c:5186:22: sparse: sparse: invalid assignment: |= fs/io_uring.c:5186:22: sparse: left side has type restricted __poll_t fs/io_uring.c:5186:22: sparse: right side has type int fs/io_uring.c:5188:22: sparse: sparse: invalid assignment: |= fs/io_uring.c:5188:22: sparse: left side has type restricted __poll_t fs/io_uring.c:5188:22: sparse: right side has type int fs/io_uring.c:5193:22: sparse: sparse: invalid assignment: &= fs/io_uring.c:5193:22: sparse: left side has type restricted __poll_t fs/io_uring.c:5193:22: sparse: right side has type int fs/io_uring.c:5195:14: sparse: sparse: invalid assignment: |= fs/io_uring.c:5195:14: sparse: left side has type restricted __poll_t fs/io_uring.c:5195:14: sparse: right side has type int fs/io_uring.c:5207:67: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@ fs/io_uring.c:5207:67: sparse: expected int mask fs/io_uring.c:5207:67: sparse: got restricted __poll_t [assigned] [usertype] mask fs/io_uring.c:5208:52: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@ fs/io_uring.c:5208:52: sparse: expected int events fs/io_uring.c:5208:52: sparse: got restricted __poll_t [usertype] events fs/io_uring.c:5334:24: sparse: sparse: invalid assignment: |= fs/io_uring.c:5334:24: sparse: left side has type unsigned int fs/io_uring.c:5334:24: sparse: right side has type restricted __poll_t fs/io_uring.c:5335:65: sparse: sparse: restricted __poll_t degrades to integer fs/io_uring.c:5335:29: sparse: sparse: restricted __poll_t degrades to integer fs/io_uring.c:5335:38: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int @@ fs/io_uring.c:5335:38: sparse: expected restricted __poll_t fs/io_uring.c:5335:38: sparse: got unsigned int fs/io_uring.c:5472:35: sparse: sparse: invalid assignment: &= fs/io_uring.c:5472:35: sparse: left side has type restricted __poll_t fs/io_uring.c:5472:35: sparse: right side has type int fs/io_uring.c:5473:54: sparse: sparse: restricted __poll_t degrades to integer fs/io_uring.c:5473:35: sparse: sparse: invalid assignment: |= fs/io_uring.c:5473:35: sparse: left side has type restricted __poll_t fs/io_uring.c:5473:35: sparse: right side has type unsigned int >> fs/io_uring.c:7082:42: sparse: sparse: incompatible types in comparison expression (different type sizes): >> fs/io_uring.c:7082:42: sparse: unsigned int * >> fs/io_uring.c:7082:42: sparse: unsigned long * fs/io_uring.c:7287:9: sparse: sparse: context imbalance in 'io_sq_thread_unpark' - wrong count at exit fs/io_uring.c:7298:9: sparse: sparse: context imbalance in 'io_sq_thread_park' - wrong count at exit vim +7082 fs/io_uring.c 7070 7071 static void **io_alloc_page_table(size_t size) 7072 { 7073 unsigned i, nr_tables = DIV_ROUND_UP(size, PAGE_SIZE); 7074 size_t init_size = size; 7075 void **table; 7076 7077 table = kcalloc(nr_tables, sizeof(*table), GFP_KERNEL); 7078 if (!table) 7079 return NULL; 7080 7081 for (i = 0; i < nr_tables; i++) { > 7082 unsigned int this_size = min(size, PAGE_SIZE); 7083 7084 table[i] = kzalloc(this_size, GFP_KERNEL); 7085 if (!table[i]) { 7086 io_free_page_table(table, init_size); 7087 return NULL; 7088 } 7089 size -= this_size; 7090 } 7091 return table; 7092 } 7093 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip