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>] [day] [month] [year] [list]
Message-ID: <202008261844.IO3X8mOH%lkp@intel.com>
Date:   Wed, 26 Aug 2020 18:22:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in
 'reset_queues' - unexpected unlock

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2ac69819ba9e3d8d550bb5d2d2df74848e556812
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date:   10 months ago
config: powerpc-randconfig-s032-20200826 (attached as .config)
compiler: powerpc64-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.2-191-g10164920-dirty
        git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
        # 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__' ARCH=powerpc 

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 >>)

   drivers/usb/gadget/udc/fsl_udc_core.c:71:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted __le16 [usertype] wMaxPacketSize @@     got int @@
   drivers/usb/gadget/udc/fsl_udc_core.c:71:33: sparse:     expected restricted __le16 [usertype] wMaxPacketSize
   drivers/usb/gadget/udc/fsl_udc_core.c:71:33: sparse:     got int
   drivers/usb/gadget/udc/fsl_udc_core.c:512:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] max_pkt_length @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:512:30: sparse:     expected unsigned int [usertype] max_pkt_length
   drivers/usb/gadget/udc/fsl_udc_core.c:512:30: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:707:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next_dtd_ptr @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:707:26: sparse:     expected unsigned int [usertype] next_dtd_ptr
   drivers/usb/gadget/udc/fsl_udc_core.c:707:26: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:711:30: sparse: sparse: invalid assignment: &=
   drivers/usb/gadget/udc/fsl_udc_core.c:711:30: sparse:    left side has type unsigned int
   drivers/usb/gadget/udc/fsl_udc_core.c:711:30: sparse:    right side has type restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:739:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next_td_ptr @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:739:44: sparse:     expected unsigned int [usertype] next_td_ptr
   drivers/usb/gadget/udc/fsl_udc_core.c:739:44: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:790:21: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:792:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] size_ioc_sts @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:792:27: sparse:     expected unsigned int [usertype] size_ioc_sts
   drivers/usb/gadget/udc/fsl_udc_core.c:792:27: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:796:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] buff_ptr0 @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:796:24: sparse:     expected unsigned int [usertype] buff_ptr0
   drivers/usb/gadget/udc/fsl_udc_core.c:796:24: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:797:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] buff_ptr1 @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:797:24: sparse:     expected unsigned int [usertype] buff_ptr1
   drivers/usb/gadget/udc/fsl_udc_core.c:797:24: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:798:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] buff_ptr2 @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:798:24: sparse:     expected unsigned int [usertype] buff_ptr2
   drivers/usb/gadget/udc/fsl_udc_core.c:798:24: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:799:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] buff_ptr3 @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:799:24: sparse:     expected unsigned int [usertype] buff_ptr3
   drivers/usb/gadget/udc/fsl_udc_core.c:799:24: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:800:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] buff_ptr4 @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:800:24: sparse:     expected unsigned int [usertype] buff_ptr4
   drivers/usb/gadget/udc/fsl_udc_core.c:800:24: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:824:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] size_ioc_sts @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:824:27: sparse:     expected unsigned int [usertype] size_ioc_sts
   drivers/usb/gadget/udc/fsl_udc_core.c:824:27: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:851:47: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next_td_ptr @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:851:47: sparse:     expected unsigned int [usertype] next_td_ptr
   drivers/usb/gadget/udc/fsl_udc_core.c:851:47: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:859:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] next_td_ptr @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:859:26: sparse:     expected unsigned int [usertype] next_td_ptr
   drivers/usb/gadget/udc/fsl_udc_core.c:859:26: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:1365:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] @@     got restricted __le16 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:1365:33: sparse:     expected unsigned short [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:1365:33: sparse:     got restricted __le16 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1581:32: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1582:30: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1609:37: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1614:26: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1619:39: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1621:59: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] size_ioc_int_sts @@     got restricted __le32 [usertype] @@
   drivers/usb/gadget/udc/fsl_udc_core.c:1621:59: sparse:     expected unsigned int [usertype] size_ioc_int_sts
   drivers/usb/gadget/udc/fsl_udc_core.c:1621:59: sparse:     got restricted __le32 [usertype]
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:1639:28: sparse: sparse: cast to restricted __le32
   drivers/usb/gadget/udc/fsl_udc_core.c:2426:33: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/usb/gadget/udc/fsl_udc_core.c:2426:30: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct usb_sys_interface [noderef] <asn:2> *static [toplevel] usb_sys_regs @@     got void * @@
   drivers/usb/gadget/udc/fsl_udc_core.c:2426:30: sparse:     expected struct usb_sys_interface [noderef] <asn:2> *static [toplevel] usb_sys_regs
   drivers/usb/gadget/udc/fsl_udc_core.c:2426:30: sparse:     got void *
   drivers/usb/gadget/udc/fsl_udc_core.c: note: in included file (through include/linux/seqlock.h, include/linux/time.h, include/linux/stat.h, ...):
>> include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'reset_queues' - unexpected unlock
   drivers/usb/gadget/udc/fsl_udc_core.c:2161:27: sparse: sparse: dereference of noderef expression
   drivers/usb/gadget/udc/fsl_udc_core.c:2164:27: sparse: sparse: dereference of noderef expression

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80591e61a0f7e88deaada69844e4a31280c4a38f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
vim +/reset_queues +378 include/linux/spinlock.h

c2f21ce2e31286a Thomas Gleixner 2009-12-02  375  
3490565b633c705 Denys Vlasenko  2015-07-13  376  static __always_inline void spin_unlock(spinlock_t *lock)
c2f21ce2e31286a Thomas Gleixner 2009-12-02  377  {
c2f21ce2e31286a Thomas Gleixner 2009-12-02 @378  	raw_spin_unlock(&lock->rlock);
c2f21ce2e31286a Thomas Gleixner 2009-12-02  379  }
c2f21ce2e31286a Thomas Gleixner 2009-12-02  380  

:::::: The code at line 378 was first introduced by commit
:::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock

:::::: TO: Thomas Gleixner <tglx@...utronix.de>
:::::: CC: Thomas Gleixner <tglx@...utronix.de>

---
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" (32312 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ