All of lore.kernel.org
 help / color / mirror / Atom feed
* [kdave:for-5.8 2/133] fs/btrfs/locking.c:534:22: sparse: sparse: context imbalance in 'btrfs_lock_root_node' - wrong count at exit
@ 2020-06-01 12:33 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-06-01 12:33 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4296 bytes --]

CC: kbuild-all(a)lists.01.org
TO: "Jules, Irenge," <jbi.octave@gmail.com>
CC: David Sterba <dsterba@suse.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.8
head:   2166e5edce9ac1edf3b113d6091ef72fcac2d6c4
commit: 78d933c79cb649906577715af15400c7724ca633 [2/133] btrfs: add missing annotation for btrfs_tree_lock()
:::::: branch date: 4 days ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-s022-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        git checkout 78d933c79cb649906577715af15400c7724ca633
        # save the attached .config to linux build tree
        make W=1 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@intel.com>


sparse warnings: (new ones prefixed by >>)

   include/linux/kasan-checks.h:38:20: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_read' - unexpected unlock
   fs/btrfs/locking.c:232:41: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_write' - unexpected unlock
   fs/btrfs/locking.c:247:6: sparse: sparse: context imbalance in 'btrfs_tree_read_lock' - different lock contexts for basic block
   fs/btrfs/locking.c:288:5: sparse: sparse: context imbalance in 'btrfs_tree_read_lock_atomic' - different lock contexts for basic block
   fs/btrfs/locking.c:310:5: sparse: sparse: context imbalance in 'btrfs_try_tree_read_lock' - different lock contexts for basic block
   fs/btrfs/locking.c:335:5: sparse: sparse: context imbalance in 'btrfs_try_tree_write_lock' - different lock contexts for basic block
   include/linux/kasan-checks.h:38:20: sparse: sparse: context imbalance in 'btrfs_tree_read_unlock' - unexpected unlock
   fs/btrfs/locking.c:129:9: sparse: sparse: context imbalance in 'btrfs_tree_unlock' - unexpected unlock
>> fs/btrfs/locking.c:534:22: sparse: sparse: context imbalance in 'btrfs_lock_root_node' - wrong count at exit

# https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git/commit/?id=78d933c79cb649906577715af15400c7724ca633
git remote add kdave https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git
git remote update kdave
git checkout 78d933c79cb649906577715af15400c7724ca633
vim +/btrfs_lock_root_node +534 fs/btrfs/locking.c

b908c334e7a419 David Sterba 2020-02-05  527  
b908c334e7a419 David Sterba 2020-02-05  528  /*
b908c334e7a419 David Sterba 2020-02-05  529   * Loop around taking references on and locking the root node of the tree until
b908c334e7a419 David Sterba 2020-02-05  530   * we end up with a lock on the root node.
b908c334e7a419 David Sterba 2020-02-05  531   *
b908c334e7a419 David Sterba 2020-02-05  532   * Return: root extent buffer with write lock held
b908c334e7a419 David Sterba 2020-02-05  533   */
b908c334e7a419 David Sterba 2020-02-05 @534  struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root)
b908c334e7a419 David Sterba 2020-02-05  535  {
b908c334e7a419 David Sterba 2020-02-05  536  	struct extent_buffer *eb;
b908c334e7a419 David Sterba 2020-02-05  537  
b908c334e7a419 David Sterba 2020-02-05  538  	while (1) {
b908c334e7a419 David Sterba 2020-02-05  539  		eb = btrfs_root_node(root);
b908c334e7a419 David Sterba 2020-02-05  540  		btrfs_tree_lock(eb);
b908c334e7a419 David Sterba 2020-02-05  541  		if (eb == root->node)
b908c334e7a419 David Sterba 2020-02-05  542  			break;
b908c334e7a419 David Sterba 2020-02-05  543  		btrfs_tree_unlock(eb);
b908c334e7a419 David Sterba 2020-02-05  544  		free_extent_buffer(eb);
b908c334e7a419 David Sterba 2020-02-05  545  	}
b908c334e7a419 David Sterba 2020-02-05  546  	return eb;
b908c334e7a419 David Sterba 2020-02-05  547  }
b908c334e7a419 David Sterba 2020-02-05  548  

:::::: The code at line 534 was first introduced by commit
:::::: b908c334e7a419e5cd08a45d31284b4a93de3bd7 btrfs: move root node locking helpers to locking.c

:::::: TO: David Sterba <dsterba@suse.com>
:::::: CC: David Sterba <dsterba@suse.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37797 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-01 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 12:33 [kdave:for-5.8 2/133] fs/btrfs/locking.c:534:22: sparse: sparse: context imbalance in 'btrfs_lock_root_node' - wrong count at exit kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.