[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202302110944.Q3Nt0hMV-lkp@intel.com>
Date: Sat, 11 Feb 2023 09:19:52 +0800
From: kernel test robot <lkp@...el.com>
To: Qing Zhang <zhangqing@...ngson.cn>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Huacai Chen <chenhuacai@...nel.org>
Subject: net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1
(different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 420b2d431d18a2572c8e86579e78105cb5ed45b0
commit: 93a4fa622eb061f75f87f0cf9609ab4e69c67d01 LoongArch: Add STACKTRACE support
date: 6 months ago
config: loongarch-randconfig-s052-20230210 (https://download.01.org/0day-ci/archive/20230211/202302110944.Q3Nt0hMV-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=93a4fa622eb061f75f87f0cf9609ab4e69c67d01
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 93a4fa622eb061f75f87f0cf9609ab4e69c67d01
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash net/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302110944.Q3Nt0hMV-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/core/dev.c:3325:23: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned int @@
net/core/dev.c:3325:23: sparse: expected restricted __wsum [usertype] csum
net/core/dev.c:3325:23: sparse: got unsigned int
net/core/dev.c:3325:23: sparse: sparse: cast from restricted __wsum
net/core/dev.c:204:9: sparse: sparse: context imbalance in 'unlist_netdevice' - different lock contexts for basic block
net/core/dev.c:3829:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
net/core/dev.c:5056:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got unsigned int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
>> net/core/dev.c:4348:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
net/core/dev.c:4348:9: sparse: expected void *ptr
net/core/dev.c:4348:9: sparse: got int [noderef] __percpu *
vim +4348 net/core/dev.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 4341
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4342 /* Called with irq disabled */
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4343 static inline void ____napi_schedule(struct softnet_data *sd,
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4344 struct napi_struct *napi)
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4345 {
29863d41bb6e1d Wei Wang 2021-02-08 4346 struct task_struct *thread;
29863d41bb6e1d Wei Wang 2021-02-08 4347
fbd9a2ceba5c74 Sebastian Andrzej Siewior 2022-03-11 @4348 lockdep_assert_irqs_disabled();
fbd9a2ceba5c74 Sebastian Andrzej Siewior 2022-03-11 4349
29863d41bb6e1d Wei Wang 2021-02-08 4350 if (test_bit(NAPI_STATE_THREADED, &napi->state)) {
29863d41bb6e1d Wei Wang 2021-02-08 4351 /* Paired with smp_mb__before_atomic() in
5fdd2f0e5c6484 Wei Wang 2021-02-08 4352 * napi_enable()/dev_set_threaded().
5fdd2f0e5c6484 Wei Wang 2021-02-08 4353 * Use READ_ONCE() to guarantee a complete
5fdd2f0e5c6484 Wei Wang 2021-02-08 4354 * read on napi->thread. Only call
29863d41bb6e1d Wei Wang 2021-02-08 4355 * wake_up_process() when it's not NULL.
29863d41bb6e1d Wei Wang 2021-02-08 4356 */
29863d41bb6e1d Wei Wang 2021-02-08 4357 thread = READ_ONCE(napi->thread);
29863d41bb6e1d Wei Wang 2021-02-08 4358 if (thread) {
cb038357937ee4 Wei Wang 2021-03-16 4359 /* Avoid doing set_bit() if the thread is in
cb038357937ee4 Wei Wang 2021-03-16 4360 * INTERRUPTIBLE state, cause napi_thread_wait()
cb038357937ee4 Wei Wang 2021-03-16 4361 * makes sure to proceed with napi polling
cb038357937ee4 Wei Wang 2021-03-16 4362 * if the thread is explicitly woken from here.
cb038357937ee4 Wei Wang 2021-03-16 4363 */
2f064a59a11ff9 Peter Zijlstra 2021-06-11 4364 if (READ_ONCE(thread->__state) != TASK_INTERRUPTIBLE)
cb038357937ee4 Wei Wang 2021-03-16 4365 set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
29863d41bb6e1d Wei Wang 2021-02-08 4366 wake_up_process(thread);
29863d41bb6e1d Wei Wang 2021-02-08 4367 return;
29863d41bb6e1d Wei Wang 2021-02-08 4368 }
29863d41bb6e1d Wei Wang 2021-02-08 4369 }
29863d41bb6e1d Wei Wang 2021-02-08 4370
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4371 list_add_tail(&napi->poll_list, &sd->poll_list);
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4372 __raise_softirq_irqoff(NET_RX_SOFTIRQ);
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4373 }
eecfd7c4e36ff5 Eric Dumazet 2010-05-06 4374
:::::: The code at line 4348 was first introduced by commit
:::::: fbd9a2ceba5c74bbfa19cf257ae4b4b2c820860d net: Add lockdep asserts to ____napi_schedule().
:::::: TO: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists