All of lore.kernel.org
 help / color / mirror / Atom feed
* mm/memcontrol.c:1361:18: sparse: sparse: context imbalance in 'lock_page_lruvec' - wrong count at exit
@ 2021-04-24 23:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-24 23:54 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alex Shi <alex.shi@linux.alibaba.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2a1d7946fa53cea2083e5981ff55a8176ab2be6b
commit: f9b1038ebccad354256cf84749cbc321b5347497 mm/memcg: remove rcu locking for lock_page_lruvec function series
date:   8 weeks ago
:::::: branch date: 7 hours ago
:::::: commit date: 8 weeks ago
config: s390-randconfig-s032-20210425 (attached as .config)
compiler: s390-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.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f9b1038ebccad354256cf84749cbc321b5347497
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout f9b1038ebccad354256cf84749cbc321b5347497
        # 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__' W=1 ARCH=s390 

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 >>)
   mm/memcontrol.c:4179:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4179:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4179:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4181:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4181:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4181:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4337:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4337:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4337:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4431:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4431:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4431:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:5987:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:5987:23: sparse:    struct task_struct [noderef] __rcu *
   mm/memcontrol.c:5987:23: sparse:    struct task_struct *
>> mm/memcontrol.c:1361:18: sparse: sparse: context imbalance in 'lock_page_lruvec' - wrong count at exit
>> mm/memcontrol.c:1374:22: sparse: sparse: context imbalance in 'lock_page_lruvec_irq' - wrong count at exit
   mm/memcontrol.c: note: in included file (through include/linux/spinlock.h, include/linux/wait.h, include/linux/pid.h, ...):
   include/linux/spinlock_api_smp.h:119:31: sparse: sparse: context imbalance in 'lock_page_lruvec_irqsave' - wrong count at exit
   mm/memcontrol.c:2145:19: sparse: sparse: context imbalance in 'lock_page_memcg' - wrong count at exit
   mm/memcontrol.c:2207:17: sparse: sparse: context imbalance in '__unlock_page_memcg' - unexpected unlock

vim +/lock_page_lruvec +1361 mm/memcontrol.c

6168d0da2b479c Alex Shi 2020-12-15  1344  
6168d0da2b479c Alex Shi 2020-12-15  1345  /**
6168d0da2b479c Alex Shi 2020-12-15  1346   * lock_page_lruvec - lock and return lruvec for a given page.
6168d0da2b479c Alex Shi 2020-12-15  1347   * @page: the page
6168d0da2b479c Alex Shi 2020-12-15  1348   *
d7e3aba583e6d1 Alex Shi 2021-02-24  1349   * These functions are safe to use under any of the following conditions:
d7e3aba583e6d1 Alex Shi 2021-02-24  1350   * - page locked
d7e3aba583e6d1 Alex Shi 2021-02-24  1351   * - PageLRU cleared
d7e3aba583e6d1 Alex Shi 2021-02-24  1352   * - lock_page_memcg()
d7e3aba583e6d1 Alex Shi 2021-02-24  1353   * - page->_refcount is zero
6168d0da2b479c Alex Shi 2020-12-15  1354   */
6168d0da2b479c Alex Shi 2020-12-15  1355  struct lruvec *lock_page_lruvec(struct page *page)
6168d0da2b479c Alex Shi 2020-12-15  1356  {
6168d0da2b479c Alex Shi 2020-12-15  1357  	struct lruvec *lruvec;
6168d0da2b479c Alex Shi 2020-12-15  1358  	struct pglist_data *pgdat = page_pgdat(page);
6168d0da2b479c Alex Shi 2020-12-15  1359  
6168d0da2b479c Alex Shi 2020-12-15  1360  	lruvec = mem_cgroup_page_lruvec(page, pgdat);
6168d0da2b479c Alex Shi 2020-12-15 @1361  	spin_lock(&lruvec->lru_lock);
6168d0da2b479c Alex Shi 2020-12-15  1362  
6168d0da2b479c Alex Shi 2020-12-15  1363  	lruvec_memcg_debug(lruvec, page);
6168d0da2b479c Alex Shi 2020-12-15  1364  
6168d0da2b479c Alex Shi 2020-12-15  1365  	return lruvec;
6168d0da2b479c Alex Shi 2020-12-15  1366  }
6168d0da2b479c Alex Shi 2020-12-15  1367  
6168d0da2b479c Alex Shi 2020-12-15  1368  struct lruvec *lock_page_lruvec_irq(struct page *page)
6168d0da2b479c Alex Shi 2020-12-15  1369  {
6168d0da2b479c Alex Shi 2020-12-15  1370  	struct lruvec *lruvec;
6168d0da2b479c Alex Shi 2020-12-15  1371  	struct pglist_data *pgdat = page_pgdat(page);
6168d0da2b479c Alex Shi 2020-12-15  1372  
6168d0da2b479c Alex Shi 2020-12-15  1373  	lruvec = mem_cgroup_page_lruvec(page, pgdat);
6168d0da2b479c Alex Shi 2020-12-15 @1374  	spin_lock_irq(&lruvec->lru_lock);
6168d0da2b479c Alex Shi 2020-12-15  1375  
6168d0da2b479c Alex Shi 2020-12-15  1376  	lruvec_memcg_debug(lruvec, page);
6168d0da2b479c Alex Shi 2020-12-15  1377  
6168d0da2b479c Alex Shi 2020-12-15  1378  	return lruvec;
6168d0da2b479c Alex Shi 2020-12-15  1379  }
6168d0da2b479c Alex Shi 2020-12-15  1380  

:::::: The code at line 1361 was first introduced by commit
:::::: 6168d0da2b479ce25a4647de194045de1bdd1f1d mm/lru: replace pgdat lru_lock with lruvec lock

:::::: TO: Alex Shi <alex.shi@linux.alibaba.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

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

only message in thread, other threads:[~2021-04-24 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 23:54 mm/memcontrol.c:1361:18: sparse: sparse: context imbalance in 'lock_page_lruvec' - wrong count at exit 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.