lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202005180416.NP0VQkBN%lkp@intel.com>
Date:   Mon, 18 May 2020 04:04:27 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Brian Gerst <brgerst@...il.com>, linux-kernel@...r.kernel.org,
        x86@...nel.org
Cc:     kbuild-all@...ts.01.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Brian Gerst <brgerst@...il.com>
Subject: Re: [PATCH 4/7] x86/percpu: Clean up percpu_add_op()

Hi Brian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on dennis-percpu/for-next]
[also build test WARNING on tip/auto-latest linus/master linux/master v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Brian-Gerst/x86-Clean-up-percpu-operations/20200517-233137
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-next
config: x86_64-allyesconfig (attached as .config)
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        # save the attached .config to linux build tree
        make C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)

   kernel/fork.c:995:19: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct task_struct [noderef] <asn:4> *owner @@    got  [noderef] <asn:4> *owner @@
   kernel/fork.c:995:19: sparse:    expected struct task_struct [noderef] <asn:4> *owner
   kernel/fork.c:995:19: sparse:    got struct task_struct *p
   kernel/fork.c:1507:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct refcount_struct [usertype] *r @@    got struct struct refcount_struct [usertype] *r @@
   kernel/fork.c:1507:38: sparse:    expected struct refcount_struct [usertype] *r
   kernel/fork.c:1507:38: sparse:    got struct refcount_struct [noderef] <asn:4> *
   kernel/fork.c:1516:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:1516:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:1516:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:1517:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const *from @@    got struct k_sigaction [noderevoid const *from @@
   kernel/fork.c:1517:9: sparse:    expected void const *from
   kernel/fork.c:1517:9: sparse:    got struct k_sigaction [noderef] <asn:4> *
   kernel/fork.c:1518:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:1518:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:1518:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:1610:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct qspinlock *lock @@    got struct qspinlock [struct qspinlock *lock @@
   kernel/fork.c:1610:9: sparse:    expected struct qspinlock *lock
   kernel/fork.c:1610:9: sparse:    got struct qspinlock [noderef] <asn:4> *
   kernel/fork.c:1910:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:1910:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:1910:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:1914:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:1914:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:1914:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2210:32: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct task_struct [noderef] <asn:4> *real_parent @@    got  [noderef] <asn:4> *real_parent @@
   kernel/fork.c:2210:32: sparse:    expected struct task_struct [noderef] <asn:4> *real_parent
   kernel/fork.c:2210:32: sparse:    got struct task_struct *
   kernel/fork.c:2216:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:2216:27: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:2216:27: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2265:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct list_head *head @@    got struct list_head [struct list_head *head @@
   kernel/fork.c:2265:54: sparse:    expected struct list_head *head
   kernel/fork.c:2265:54: sparse:    got struct list_head [noderef] <asn:4> *
   kernel/fork.c:2286:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:2286:29: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:2286:29: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2301:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:2301:29: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:2301:29: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2330:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct sighand_struct *sighand @@    got struct sighand_strstruct sighand_struct *sighand @@
   kernel/fork.c:2330:28: sparse:    expected struct sighand_struct *sighand
   kernel/fork.c:2330:28: sparse:    got struct sighand_struct [noderef] <asn:4> *sighand
   kernel/fork.c:2358:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:2358:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:2358:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2360:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/fork.c:2360:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/fork.c:2360:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/fork.c:2766:24: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct task_struct *[assigned] parent @@    got struct struct task_struct *[assigned] parent @@
   kernel/fork.c:2766:24: sparse:    expected struct task_struct *[assigned] parent
   kernel/fork.c:2766:24: sparse:    got struct task_struct [noderef] <asn:4> *real_parent
   kernel/fork.c:2847:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct refcount_struct const [usertype] *r @@    got sstruct refcount_struct const [usertype] *r @@
   kernel/fork.c:2847:43: sparse:    expected struct refcount_struct const [usertype] *r
   kernel/fork.c:2847:43: sparse:    got struct refcount_struct [noderef] <asn:4> *
   kernel/fork.c:1945:27: sparse: sparse: dereference of noderef expression
   kernel/fork.c:1945:27: sparse: sparse: dereference of noderef expression
   kernel/fork.c:1947:22: sparse: sparse: dereference of noderef expression
   include/linux/ptrace.h:218:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct task_struct *new_parent @@    got struct task_structstruct task_struct *new_parent @@
   include/linux/ptrace.h:218:45: sparse:    expected struct task_struct *new_parent
   include/linux/ptrace.h:218:45: sparse:    got struct task_struct [noderef] <asn:4> *parent
   include/linux/ptrace.h:218:62: sparse: sparse: incorrect type in argument 3 (different address spaces) @@    expected struct cred const *ptracer_cred @@    got struct cred const struct cred const *ptracer_cred @@
   include/linux/ptrace.h:218:62: sparse:    expected struct cred const *ptracer_cred
   include/linux/ptrace.h:218:62: sparse:    got struct cred const [noderef] <asn:4> *ptracer_cred
   kernel/fork.c:2263:59: sparse: sparse: dereference of noderef expression
   kernel/fork.c:2264:59: sparse: sparse: dereference of noderef expression
   include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   kernel/fork.c:987:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/fork.c:987:23: sparse:    struct task_struct [noderef] <asn:4> *
   kernel/fork.c:987:23: sparse:    struct task_struct *
--
   include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   kernel/cpu.c:827:9: sparse: sparse: context imbalance in 'clear_tasks_mm_cpumask' - different lock contexts for basic block
--
   kernel/signal.c:2919:27: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:2921:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:2921:29: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:2921:29: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3072:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3072:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3072:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3075:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3075:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3075:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3458:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3458:27: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3458:27: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3470:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3470:37: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3470:37: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3475:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3475:35: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3475:35: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3480:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3480:29: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3480:29: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3681:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct siginfo const [noderef] [usertype] <asn:1> *from @@    got deref] [usertype] <asn:1> *from @@
   kernel/signal.c:3681:46: sparse:    expected struct siginfo const [noderef] [usertype] <asn:1> *from
   kernel/signal.c:3681:46: sparse:    got struct siginfo [usertype] *info
   kernel/signal.c:3933:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3933:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3933:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3945:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3945:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3945:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3963:11: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct k_sigaction *k @@    got struct k_sigactionstruct k_sigaction *k @@
   kernel/signal.c:3963:11: sparse:    expected struct k_sigaction *k
   kernel/signal.c:3963:11: sparse:    got struct k_sigaction [noderef] <asn:4> *
   kernel/signal.c:3965:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3965:25: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3965:25: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:3995:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:3995:27: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:3995:27: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:4594:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:4594:29: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:4594:29: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:4603:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:4603:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:4603:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:4613:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/signal.c:4613:23: sparse:    expected struct spinlock [usertype] *lock
   kernel/signal.c:4613:23: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:69:34: sparse: sparse: dereference of noderef expression
   kernel/signal.c:528:35: sparse: sparse: dereference of noderef expression
   kernel/signal.c:556:52: sparse: sparse: dereference of noderef expression
   kernel/signal.c:1030:13: sparse: sparse: dereference of noderef expression
   include/linux/signalfd.h:21:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct wait_queue_head *wq_head @@    got struct wait_queue_struct wait_queue_head *wq_head @@
   include/linux/signalfd.h:21:13: sparse:    expected struct wait_queue_head *wq_head
   include/linux/signalfd.h:21:13: sparse:    got struct wait_queue_head [noderef] <asn:4> *
   include/linux/signalfd.h:22:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct wait_queue_head *wq_head @@    got struct wait_queue_struct wait_queue_head *wq_head @@
   include/linux/signalfd.h:22:17: sparse:    expected struct wait_queue_head *wq_head
   include/linux/signalfd.h:22:17: sparse:    got struct wait_queue_head [noderef] <asn:4> *
   include/linux/sched/signal.h:681:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   include/linux/sched/signal.h:681:37: sparse:    expected struct spinlock [usertype] *lock
   include/linux/sched/signal.h:681:37: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:1294:9: sparse: sparse: context imbalance in 'do_send_sig_info' - different lock contexts for basic block
   include/linux/rcupdate.h:651:9: sparse: sparse: context imbalance in '__lock_task_sighand' - different lock contexts for basic block
   include/linux/sched/signal.h:681:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   include/linux/sched/signal.h:681:37: sparse:    expected struct spinlock [usertype] *lock
   include/linux/sched/signal.h:681:37: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/signal.c:1650:35: sparse: sparse: dereference of noderef expression
   include/linux/signalfd.h:21:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct wait_queue_head *wq_head @@    got struct wait_queue_struct wait_queue_head *wq_head @@
   include/linux/signalfd.h:21:13: sparse:    expected struct wait_queue_head *wq_head
   include/linux/signalfd.h:21:13: sparse:    got struct wait_queue_head [noderef] <asn:4> *
   include/linux/signalfd.h:22:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct wait_queue_head *wq_head @@    got struct wait_queue_struct wait_queue_head *wq_head @@
   include/linux/signalfd.h:22:17: sparse:    expected struct wait_queue_head *wq_head
   include/linux/signalfd.h:22:17: sparse:    got struct wait_queue_head [noderef] <asn:4> *
   include/linux/sched/signal.h:681:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   include/linux/sched/signal.h:681:37: sparse:    expected struct spinlock [usertype] *lock
   include/linux/sched/signal.h:681:37: sparse:    got struct spinlock [noderef] <asn:4> *
   include/linux/rcupdate.h:653:9: sparse: sparse: context imbalance in 'send_sigqueue' - wrong count at exit
   kernel/signal.c:1934:47: sparse: sparse: dereference of noderef expression
   kernel/signal.c:1954:40: sparse: sparse: dereference of noderef expression
   kernel/signal.c:1954:40: sparse: sparse: dereference of noderef expression
   kernel/signal.c:2093:13: sparse: sparse: dereference of noderef expression
   include/linux/ptrace.h:99:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct task_struct *p1 @@    got struct task_structstruct task_struct *p1 @@
   include/linux/ptrace.h:99:40: sparse:    expected struct task_struct *p1
   include/linux/ptrace.h:99:40: sparse:    got struct task_struct [noderef] <asn:4> *real_parent
   include/linux/ptrace.h:99:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct task_struct *p2 @@    got struct task_structstruct task_struct *p2 @@
   include/linux/ptrace.h:99:60: sparse:    expected struct task_struct *p2
   include/linux/ptrace.h:99:60: sparse:    got struct task_struct [noderef] <asn:4> *parent
   kernel/signal.c:2304:13: sparse: sparse: context imbalance in 'do_signal_stop' - different lock contexts for basic block
   kernel/signal.c:2513:49: sparse: sparse: dereference of noderef expression
   kernel/signal.c:2513:49: sparse: sparse: dereference of noderef expression
   include/linux/ptrace.h:99:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct task_struct *p1 @@    got struct task_structstruct task_struct *p1 @@
   include/linux/ptrace.h:99:40: sparse:    expected struct task_struct *p1
   include/linux/ptrace.h:99:40: sparse:    got struct task_struct [noderef] <asn:4> *real_parent
   include/linux/ptrace.h:99:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct task_struct *p2 @@    got struct task_structstruct task_struct *p2 @@
   include/linux/ptrace.h:99:60: sparse:    expected struct task_struct *p2
   include/linux/ptrace.h:99:60: sparse:    got struct task_struct [noderef] <asn:4> *parent
   kernel/signal.c:2596:69: sparse: sparse: context imbalance in 'get_signal' - unexpected unlock
   include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   kernel/signal.c:3741:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct siginfo [usertype] *info @@    got struct siginfo [nostruct siginfo [usertype] *info @@
   kernel/signal.c:3741:58: sparse:    expected struct siginfo [usertype] *info
   kernel/signal.c:3741:58: sparse:    got struct siginfo [noderef] [usertype] <asn:1> *info
   kernel/signal.c:3934:33: sparse: sparse: dereference of noderef expression
--
   kernel/locking/locktorture.c:575:6: sparse: sparse: symbol 'torture_percpu_rwsem_init' was not declared. Should it be static?
   kernel/locking/locktorture.c:320:12: sparse: sparse: context imbalance in 'torture_mutex_lock' - wrong count at exit
   kernel/locking/locktorture.c:340:13: sparse: sparse: context imbalance in 'torture_mutex_unlock' - wrong count at exit
   kernel/locking/locktorture.c:362:12: sparse: sparse: context imbalance in 'torture_ww_mutex_lock' - wrong count at exit
   kernel/locking/locktorture.c:407:13: sparse: sparse: context imbalance in 'torture_ww_mutex_unlock' - wrong count at exit
   kernel/locking/locktorture.c:431:12: sparse: sparse: context imbalance in 'torture_rtmutex_lock' - wrong count at exit
   kernel/locking/locktorture.c:493:13: sparse: sparse: context imbalance in 'torture_rtmutex_unlock' - wrong count at exit
   kernel/locking/locktorture.c:511:12: sparse: sparse: context imbalance in 'torture_rwsem_down_write' - wrong count at exit
   kernel/locking/locktorture.c:531:13: sparse: sparse: context imbalance in 'torture_rwsem_up_write' - wrong count at exit
   kernel/locking/locktorture.c:536:12: sparse: sparse: context imbalance in 'torture_rwsem_down_read' - wrong count at exit
   kernel/locking/locktorture.c:556:13: sparse: sparse: context imbalance in 'torture_rwsem_up_read' - wrong count at exit
   kernel/locking/locktorture.c:580:12: sparse: sparse: context imbalance in 'torture_percpu_rwsem_down_write' - wrong count at exit
   kernel/locking/locktorture.c:586:13: sparse: sparse: context imbalance in 'torture_percpu_rwsem_up_write' - wrong count at exit
   include/linux/percpu-rwsem.h:58:9: sparse: sparse: context imbalance in 'torture_percpu_rwsem_down_read' - wrong count at exit
   include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   include/linux/percpu-rwsem.h:94:9: sparse: sparse: context imbalance in 'torture_percpu_rwsem_up_read' - wrong count at exit
--
   net/sched/sch_generic.c:189:50: sparse: sparse: context imbalance in 'try_bulk_dequeue_skb_slow' - different lock contexts for basic block
   include/net/sch_generic.h:888:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/net/sch_generic.h:888:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   net/sched/sch_generic.c:248:17: sparse: sparse: context imbalance in 'dequeue_skb' - different lock contexts for basic block
   net/sched/sch_generic.c:294:28: sparse: sparse: context imbalance in 'sch_direct_xmit' - unexpected unlock
   net/sched/sch_generic.c:1127:9: sparse: sparse: context imbalance in 'dev_deactivate_queue' - different lock contexts for basic block
--
   kernel/events/uprobes.c:1978:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/events/uprobes.c:1978:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/events/uprobes.c:1978:33: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/events/uprobes.c:1980:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/events/uprobes.c:1980:35: sparse:    expected struct spinlock [usertype] *lock
   kernel/events/uprobes.c:1980:35: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/events/uprobes.c:2277:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/events/uprobes.c:2277:31: sparse:    expected struct spinlock [usertype] *lock
   kernel/events/uprobes.c:2277:31: sparse:    got struct spinlock [noderef] <asn:4> *
   kernel/events/uprobes.c:2279:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct spinlock [usertype] *lock @@    got struct struct spinlock [usertype] *lock @@
   kernel/events/uprobes.c:2279:33: sparse:    expected struct spinlock [usertype] *lock
   kernel/events/uprobes.c:2279:33: sparse:    got struct spinlock [noderef] <asn:4> *
   include/linux/rmap.h:220:28: sparse: sparse: context imbalance in '__replace_page' - unexpected unlock
   include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> include/linux/percpu-rwsem.h:91:17: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
--
   drivers/infiniband/hw/hfi1/pio_copy.c:421:24: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/infiniband/hw/hfi1/pio_copy.c:421:24: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/infiniband/hw/hfi1/pio_copy.c:547:24: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/infiniband/hw/hfi1/pio_copy.c:547:24: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/infiniband/hw/hfi1/pio_copy.c:164:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> drivers/infiniband/hw/hfi1/pio_copy.c:164:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
   drivers/infiniband/hw/hfi1/pio_copy.c:755:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
   drivers/infiniband/hw/hfi1/pio_copy.c:755:9: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)

vim +91 include/linux/percpu-rwsem.h

80127a39681bd6 Peter Zijlstra  2016-07-14  83  
02e525b2aff1d6 Peter Zijlstra  2019-02-21  84  static inline void percpu_up_read(struct percpu_rw_semaphore *sem)
80127a39681bd6 Peter Zijlstra  2016-07-14  85  {
02e525b2aff1d6 Peter Zijlstra  2019-02-21  86  	preempt_disable();
80127a39681bd6 Peter Zijlstra  2016-07-14  87  	/*
80127a39681bd6 Peter Zijlstra  2016-07-14  88  	 * Same as in percpu_down_read().
80127a39681bd6 Peter Zijlstra  2016-07-14  89  	 */
80127a39681bd6 Peter Zijlstra  2016-07-14  90  	if (likely(rcu_sync_is_idle(&sem->rss)))
80127a39681bd6 Peter Zijlstra  2016-07-14 @91  		__this_cpu_dec(*sem->read_count);
80127a39681bd6 Peter Zijlstra  2016-07-14  92  	else
80127a39681bd6 Peter Zijlstra  2016-07-14  93  		__percpu_up_read(sem); /* Unconditional memory barrier */
80127a39681bd6 Peter Zijlstra  2016-07-14  94  	preempt_enable();
80127a39681bd6 Peter Zijlstra  2016-07-14  95  
5facae4f3549b5 Qian Cai        2019-09-19  96  	rwsem_release(&sem->rw_sem.dep_map, _RET_IP_);
80127a39681bd6 Peter Zijlstra  2016-07-14  97  }
5c1eabe68501d1 Mikulas Patocka 2012-10-22  98  

:::::: The code at line 91 was first introduced by commit
:::::: 80127a39681bd68c959f0953f84a830cbd7c3b1c locking/percpu-rwsem: Optimize readers and reduce global impact

:::::: TO: Peter Zijlstra <peterz@...radead.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (72383 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ