Re: [PATCH v3 09/20] mm: swap: allocate a virtual swap slot for each swapped out page
From: kernel test robot
Date: Mon Feb 09 2026 - 12:13:09 EST
Hi Nhat,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.19]
[cannot apply to akpm-mm/mm-everything tj-cgroup/for-next tip/smp/core next-20260205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nhat-Pham/swap-rearrange-the-swap-header-file/20260209-065842
base: linus/master
patch link: https://lore.kernel.org/r/20260208215839.87595-10-nphamcs%40gmail.com
patch subject: [PATCH v3 09/20] mm: swap: allocate a virtual swap slot for each swapped out page
config: s390-randconfig-r134-20260209 (https://download.01.org/0day-ci/archive/20260210/202602100110.Au8uHgc8-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260210/202602100110.Au8uHgc8-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602100110.Au8uHgc8-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> mm/vswap.c:653:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t * @@
mm/vswap.c:653:9: sparse: expected void const [noderef] __percpu *__vpp_verify
mm/vswap.c:653:9: sparse: got struct local_lock_t *
>> mm/vswap.c:653:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t * @@
mm/vswap.c:653:9: sparse: expected void const [noderef] __percpu *__vpp_verify
mm/vswap.c:653:9: sparse: got struct local_lock_t *
mm/vswap.c:665:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t * @@
mm/vswap.c:665:9: sparse: expected void const [noderef] __percpu *__vpp_verify
mm/vswap.c:665:9: sparse: got struct local_lock_t *
mm/vswap.c:665:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t * @@
mm/vswap.c:665:9: sparse: expected void const [noderef] __percpu *__vpp_verify
mm/vswap.c:665:9: sparse: got struct local_lock_t *
mm/vswap.c:182:36: sparse: sparse: context imbalance in 'vswap_iter' - unexpected unlock
mm/vswap.c:284:17: sparse: sparse: context imbalance in 'vswap_alloc' - different lock contexts for basic block
mm/vswap.c:413:19: sparse: sparse: context imbalance in 'vswap_free' - unexpected unlock
mm/vswap.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'folio_alloc_swap' - unexpected unlock
mm/vswap.c:570:9: sparse: sparse: context imbalance in 'swp_entry_to_swp_slot' - unexpected unlock
vim +653 mm/vswap.c
643
644 static int vswap_cpu_dead(unsigned int cpu)
645 {
646 struct percpu_vswap_cluster *percpu_cluster;
647 struct vswap_cluster *cluster;
648 int order;
649
650 percpu_cluster = per_cpu_ptr(&percpu_vswap_cluster, cpu);
651
652 rcu_read_lock();
> 653 local_lock(&percpu_cluster->lock);
654 for (order = 0; order < SWAP_NR_ORDERS; order++) {
655 cluster = percpu_cluster->clusters[order];
656 if (cluster) {
657 percpu_cluster->clusters[order] = NULL;
658 spin_lock(&cluster->lock);
659 cluster->cached = false;
660 if (refcount_dec_and_test(&cluster->refcnt))
661 vswap_cluster_free(cluster);
662 spin_unlock(&cluster->lock);
663 }
664 }
665 local_unlock(&percpu_cluster->lock);
666 rcu_read_unlock();
667
668 return 0;
669 }
670
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki