* include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock
@ 2020-08-05 0:28 kernel test robot
2020-08-05 1:54 ` Eric Biggers
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-08-05 0:28 UTC (permalink / raw)
To: Eric Biggers; +Cc: kbuild-all, linux-kernel, Theodore Ts'o
[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4f30a60aa78410496e5ffe632a371c00f0d83a8d
commit: 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b fscrypt: move v1 policy key setup to keysetup_v1.c
date: 12 months ago
config: powerpc64-randconfig-s031-20200805 (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-117-g8c7aee71-dirty
git checkout 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b
# 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=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
fs/crypto/keysetup_v1.c: note: in included file (through arch/powerpc/include/asm/mmiowb.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
>> include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock
vim +/fscrypt_put_direct_key +56 include/asm-generic/mmiowb.h
d1be6a28b13ce6d Will Deacon 2019-02-22 46
d1be6a28b13ce6d Will Deacon 2019-02-22 47 static inline void mmiowb_spin_unlock(void)
d1be6a28b13ce6d Will Deacon 2019-02-22 48 {
d1be6a28b13ce6d Will Deacon 2019-02-22 49 struct mmiowb_state *ms = __mmiowb_state();
d1be6a28b13ce6d Will Deacon 2019-02-22 50
d1be6a28b13ce6d Will Deacon 2019-02-22 51 if (unlikely(ms->mmiowb_pending)) {
d1be6a28b13ce6d Will Deacon 2019-02-22 52 ms->mmiowb_pending = 0;
d1be6a28b13ce6d Will Deacon 2019-02-22 53 mmiowb();
d1be6a28b13ce6d Will Deacon 2019-02-22 54 }
d1be6a28b13ce6d Will Deacon 2019-02-22 55
d1be6a28b13ce6d Will Deacon 2019-02-22 @56 ms->nesting_count--;
:::::: The code at line 56 was first introduced by commit
:::::: d1be6a28b13ce6d1bc42bf9b6a9454c65839225b asm-generic/mmiowb: Add generic implementation of mmiowb() tracking
:::::: TO: Will Deacon <will.deacon@arm.com>
:::::: CC: Will Deacon <will.deacon@arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26241 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock
2020-08-05 0:28 include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock kernel test robot
@ 2020-08-05 1:54 ` Eric Biggers
0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2020-08-05 1:54 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, linux-kernel, Theodore Ts'o, linux-fscrypt
On Wed, Aug 05, 2020 at 08:28:53AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 4f30a60aa78410496e5ffe632a371c00f0d83a8d
> commit: 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b fscrypt: move v1 policy key setup to keysetup_v1.c
> date: 12 months ago
> config: powerpc64-randconfig-s031-20200805 (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-117-g8c7aee71-dirty
> git checkout 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b
> # 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=powerpc64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
>
> fs/crypto/keysetup_v1.c: note: in included file (through arch/powerpc/include/asm/mmiowb.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
> >> include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock
>
> vim +/fscrypt_put_direct_key +56 include/asm-generic/mmiowb.h
>
> d1be6a28b13ce6d Will Deacon 2019-02-22 46
> d1be6a28b13ce6d Will Deacon 2019-02-22 47 static inline void mmiowb_spin_unlock(void)
> d1be6a28b13ce6d Will Deacon 2019-02-22 48 {
> d1be6a28b13ce6d Will Deacon 2019-02-22 49 struct mmiowb_state *ms = __mmiowb_state();
> d1be6a28b13ce6d Will Deacon 2019-02-22 50
> d1be6a28b13ce6d Will Deacon 2019-02-22 51 if (unlikely(ms->mmiowb_pending)) {
> d1be6a28b13ce6d Will Deacon 2019-02-22 52 ms->mmiowb_pending = 0;
> d1be6a28b13ce6d Will Deacon 2019-02-22 53 mmiowb();
> d1be6a28b13ce6d Will Deacon 2019-02-22 54 }
> d1be6a28b13ce6d Will Deacon 2019-02-22 55
> d1be6a28b13ce6d Will Deacon 2019-02-22 @56 ms->nesting_count--;
>
> :::::: The code at line 56 was first introduced by commit
> :::::: d1be6a28b13ce6d1bc42bf9b6a9454c65839225b asm-generic/mmiowb: Add generic implementation of mmiowb() tracking
>
> :::::: TO: Will Deacon <will.deacon@arm.com>
> :::::: CC: Will Deacon <will.deacon@arm.com>
>
False positive because refcount_dec_and_lock() is missing a sparse annotation.
I tried to add one to make it match atomic_dec_and_lock(), but the patch was
rejected: https://lkml.kernel.org/lkml/20191226152922.2034-1-ebiggers@kernel.org/T/#u
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-05 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 0:28 include/asm-generic/mmiowb.h:56:9: sparse: sparse: context imbalance in 'fscrypt_put_direct_key' - unexpected unlock kernel test robot
2020-08-05 1:54 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).