All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:fscache-iter 24/77] fs/fscache/cookie.c:417:9: sparse: sparse: context imbalance in '__fscache_use_cookie' - different lock contexts for basic block
@ 2021-01-20 23:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-20 23:21 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head:   b4bd0d0f8fce90046f12d2e6f674c0ba023a7419
commit: c96bc3c2cb1949c6e72d5674854338da99ea0e60 [24/77] fscache: Replace the object management state machine
:::::: branch date: 30 hours ago
:::::: commit date: 30 hours ago
config: i386-randconfig-s002-20210119 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=c96bc3c2cb1949c6e72d5674854338da99ea0e60
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs fscache-iter
        git checkout c96bc3c2cb1949c6e72d5674854338da99ea0e60
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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/fscache/cookie.c:417:9: sparse: sparse: context imbalance in '__fscache_use_cookie' - different lock contexts for basic block

vim +/__fscache_use_cookie +417 fs/fscache/cookie.c

ccc4fc3d11e91477 David Howells 2009-04-03  357  
94d30ae90a00cafe David Howells 2013-09-21  358  /*
c96bc3c2cb1949c6 David Howells 2020-02-06  359   * Start using the cookie for I/O.  This prevents the backing object from being
c96bc3c2cb1949c6 David Howells 2020-02-06  360   * reaped by VM pressure.
ccc4fc3d11e91477 David Howells 2009-04-03  361   */
c96bc3c2cb1949c6 David Howells 2020-02-06  362  void __fscache_use_cookie(struct fscache_cookie *cookie, bool will_modify)
ccc4fc3d11e91477 David Howells 2009-04-03  363  {
c96bc3c2cb1949c6 David Howells 2020-02-06  364  	enum fscache_cookie_stage stage;
ccc4fc3d11e91477 David Howells 2009-04-03  365  
c96bc3c2cb1949c6 David Howells 2020-02-06  366  	_enter("c=%08x", cookie->debug_id);
ccc4fc3d11e91477 David Howells 2009-04-03  367  
c96bc3c2cb1949c6 David Howells 2020-02-06  368  	if (WARN(test_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags),
c96bc3c2cb1949c6 David Howells 2020-02-06  369  		 "Trying to use relinquished cookie\n"))
c96bc3c2cb1949c6 David Howells 2020-02-06  370  		return;
ccc4fc3d11e91477 David Howells 2009-04-03  371  
c96bc3c2cb1949c6 David Howells 2020-02-06  372  	spin_lock(&cookie->lock);
ccc4fc3d11e91477 David Howells 2009-04-03  373  
c96bc3c2cb1949c6 David Howells 2020-02-06  374  	atomic_inc(&cookie->n_active);
ccc4fc3d11e91477 David Howells 2009-04-03  375  
c96bc3c2cb1949c6 David Howells 2020-02-06  376  again:
c96bc3c2cb1949c6 David Howells 2020-02-06  377  	stage = cookie->stage;
c96bc3c2cb1949c6 David Howells 2020-02-06  378  	switch (stage) {
c96bc3c2cb1949c6 David Howells 2020-02-06  379  	case FSCACHE_COOKIE_STAGE_QUIESCENT:
c96bc3c2cb1949c6 David Howells 2020-02-06  380  		cookie->stage = FSCACHE_COOKIE_STAGE_INITIALISING;
ccc4fc3d11e91477 David Howells 2009-04-03  381  
c96bc3c2cb1949c6 David Howells 2020-02-06  382  		/* The lookup job holds its own active increment */
c96bc3c2cb1949c6 David Howells 2020-02-06  383  		atomic_inc(&cookie->n_active);
c96bc3c2cb1949c6 David Howells 2020-02-06  384  		spin_unlock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  385  		wake_up_cookie_stage(cookie);
ccc4fc3d11e91477 David Howells 2009-04-03  386  
c96bc3c2cb1949c6 David Howells 2020-02-06  387  		fscache_dispatch(cookie, NULL, will_modify, fscache_lookup_object);
c96bc3c2cb1949c6 David Howells 2020-02-06  388  		break;
ccc4fc3d11e91477 David Howells 2009-04-03  389  
c96bc3c2cb1949c6 David Howells 2020-02-06  390  	case FSCACHE_COOKIE_STAGE_INITIALISING:
c96bc3c2cb1949c6 David Howells 2020-02-06  391  	case FSCACHE_COOKIE_STAGE_LOOKING_UP:
ccc4fc3d11e91477 David Howells 2009-04-03  392  		spin_unlock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  393  		wait_var_event(&cookie->stage, READ_ONCE(cookie->stage) != stage);
c96bc3c2cb1949c6 David Howells 2020-02-06  394  		spin_lock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  395  		goto again;
ccc4fc3d11e91477 David Howells 2009-04-03  396  
c96bc3c2cb1949c6 David Howells 2020-02-06  397  	case FSCACHE_COOKIE_STAGE_NO_DATA_YET:
c96bc3c2cb1949c6 David Howells 2020-02-06  398  	case FSCACHE_COOKIE_STAGE_ACTIVE:
c96bc3c2cb1949c6 David Howells 2020-02-06  399  	case FSCACHE_COOKIE_STAGE_INVALIDATING:
c96bc3c2cb1949c6 David Howells 2020-02-06  400  		// TODO: Handle will_modify
c96bc3c2cb1949c6 David Howells 2020-02-06  401  		spin_unlock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  402  		break;
ccc4fc3d11e91477 David Howells 2009-04-03  403  
c96bc3c2cb1949c6 David Howells 2020-02-06  404  	case FSCACHE_COOKIE_STAGE_FAILED:
c96bc3c2cb1949c6 David Howells 2020-02-06  405  	case FSCACHE_COOKIE_STAGE_WITHDRAWING:
ccc4fc3d11e91477 David Howells 2009-04-03  406  		spin_unlock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  407  		break;
ccc4fc3d11e91477 David Howells 2009-04-03  408  
c96bc3c2cb1949c6 David Howells 2020-02-06  409  	case FSCACHE_COOKIE_STAGE_INDEX:
c96bc3c2cb1949c6 David Howells 2020-02-06  410  	case FSCACHE_COOKIE_STAGE_DROPPED:
c96bc3c2cb1949c6 David Howells 2020-02-06  411  	case FSCACHE_COOKIE_STAGE_RELINQUISHING:
c96bc3c2cb1949c6 David Howells 2020-02-06  412  		spin_unlock(&cookie->lock);
c96bc3c2cb1949c6 David Howells 2020-02-06  413  		WARN(1, "Can't use cookie in stage %u\n", cookie->stage);
c96bc3c2cb1949c6 David Howells 2020-02-06  414  		break;
ccc4fc3d11e91477 David Howells 2009-04-03  415  	}
ccc4fc3d11e91477 David Howells 2009-04-03  416  
c96bc3c2cb1949c6 David Howells 2020-02-06 @417  	_leave("");
ccc4fc3d11e91477 David Howells 2009-04-03  418  }
c96bc3c2cb1949c6 David Howells 2020-02-06  419  EXPORT_SYMBOL(__fscache_use_cookie);
ccc4fc3d11e91477 David Howells 2009-04-03  420  

---
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: 33031 bytes --]

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

only message in thread, other threads:[~2021-01-20 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 23:21 [dhowells-fs:fscache-iter 24/77] fs/fscache/cookie.c:417:9: sparse: sparse: context imbalance in '__fscache_use_cookie' - different lock contexts for basic block kernel 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.