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

[-- Attachment #1: Type: text/plain, Size: 6176 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:   0b18b2dc89af7a17a626618e55ab2139b9570f7a
commit: 1f1219aeeb3ac50592531894f69186c1fd0b1fce [48/85] fscache: Replace the object management state machine
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: x86_64-randconfig-s022-20210304 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-245-gacc5c298-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=1f1219aeeb3ac50592531894f69186c1fd0b1fce
        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 1f1219aeeb3ac50592531894f69186c1fd0b1fce
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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:362:6: sparse: sparse: context imbalance in '__fscache_use_cookie' - different lock contexts for basic block

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

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

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

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

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-03 23:01 [dhowells-fs:fscache-iter 48/85] fs/fscache/cookie.c:362:6: 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.