include/linux/list.h:35:9: sparse: sparse: context imbalance in 'ttm_dma_page_pool_fill_locked' - unexpected unlock

From: kernel test robot
Date: Fri Aug 28 2020 - 10:09:50 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 15bc20c6af4ceee97a1f90b43c0e386643c071b4
commit: a5460b5e5fb82656807840d40d3deaecad094044 READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
date: 4 months ago
config: arm64-randconfig-s031-20200828 (attached as .config)
compiler: aarch64-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-191-g10164920-dirty
git checkout a5460b5e5fb82656807840d40d3deaecad094044
# 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=arm64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: note: in included file (through include/linux/rculist.h, include/linux/pid.h, include/linux/sched.h, ...):
>> include/linux/list.h:35:9: sparse: sparse: context imbalance in 'ttm_dma_page_pool_fill_locked' - unexpected unlock

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5460b5e5fb82656807840d40d3deaecad094044
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a5460b5e5fb82656807840d40d3deaecad094044
vim +/ttm_dma_page_pool_fill_locked +35 include/linux/list.h

^1da177e4c3f415 Linus Torvalds 2005-04-16 22
^1da177e4c3f415 Linus Torvalds 2005-04-16 23 #define LIST_HEAD(name) \
^1da177e4c3f415 Linus Torvalds 2005-04-16 24 struct list_head name = LIST_HEAD_INIT(name)
^1da177e4c3f415 Linus Torvalds 2005-04-16 25
46deb7449d99f37 Paul E. McKenney 2019-11-09 26 /**
46deb7449d99f37 Paul E. McKenney 2019-11-09 27 * INIT_LIST_HEAD - Initialize a list_head structure
46deb7449d99f37 Paul E. McKenney 2019-11-09 28 * @list: list_head structure to be initialized.
46deb7449d99f37 Paul E. McKenney 2019-11-09 29 *
46deb7449d99f37 Paul E. McKenney 2019-11-09 30 * Initializes the list_head to point to itself. If it is a list header,
46deb7449d99f37 Paul E. McKenney 2019-11-09 31 * the result is an empty list.
46deb7449d99f37 Paul E. McKenney 2019-11-09 32 */
490d6ab170c94a7 Zach Brown 2006-02-03 33 static inline void INIT_LIST_HEAD(struct list_head *list)
490d6ab170c94a7 Zach Brown 2006-02-03 34 {
2f073848c3cc8af Paul E. McKenney 2015-10-12 @35 WRITE_ONCE(list->next, list);
490d6ab170c94a7 Zach Brown 2006-02-03 36 list->prev = list;
490d6ab170c94a7 Zach Brown 2006-02-03 37 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 38

:::::: The code at line 35 was first introduced by commit
:::::: 2f073848c3cc8aff2655ab7c46d8c0de90cf4e50 list: Use WRITE_ONCE() when initializing list_head structures

:::::: TO: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
:::::: CC: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip