All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 12831/15164] kernel/bpf/percpu_freelist.c:176:17: sparse: sparse: context imbalance in '___pcpu_freelist_pop_nmi' - different lock contexts for basic block
@ 2020-10-15 14:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-15 14:54 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Song Liu <songliubraving@fb.com>
CC: Daniel Borkmann <daniel@iogearbox.net>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   03d992bd2de6c7f2c9bbd4260ff104c0926ce3ff
commit: 39d8f0d1026a990604770a658708f5845f7dbec0 [12831/15164] bpf: Use raw_spin_trylock() for pcpu_freelist_push/pop in NMI
:::::: branch date: 7 hours ago
:::::: commit date: 10 days ago
config: ia64-randconfig-s032-20201015 (attached as .config)
compiler: ia64-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-rc1-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39d8f0d1026a990604770a658708f5845f7dbec0
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 39d8f0d1026a990604770a658708f5845f7dbec0
        # 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=ia64 

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 >>)"
>> kernel/bpf/percpu_freelist.c:176:17: sparse: sparse: context imbalance in '___pcpu_freelist_pop_nmi' - different lock contexts for basic block

vim +/___pcpu_freelist_pop_nmi +176 kernel/bpf/percpu_freelist.c

39d8f0d1026a990 Song Liu           2020-10-05  156  
39d8f0d1026a990 Song Liu           2020-10-05  157  static struct pcpu_freelist_node *
39d8f0d1026a990 Song Liu           2020-10-05  158  ___pcpu_freelist_pop_nmi(struct pcpu_freelist *s)
39d8f0d1026a990 Song Liu           2020-10-05  159  {
39d8f0d1026a990 Song Liu           2020-10-05  160  	struct pcpu_freelist_head *head;
39d8f0d1026a990 Song Liu           2020-10-05  161  	struct pcpu_freelist_node *node;
39d8f0d1026a990 Song Liu           2020-10-05  162  	int orig_cpu, cpu;
39d8f0d1026a990 Song Liu           2020-10-05  163  
39d8f0d1026a990 Song Liu           2020-10-05  164  	orig_cpu = cpu = raw_smp_processor_id();
39d8f0d1026a990 Song Liu           2020-10-05  165  	while (1) {
39d8f0d1026a990 Song Liu           2020-10-05  166  		head = per_cpu_ptr(s->freelist, cpu);
39d8f0d1026a990 Song Liu           2020-10-05  167  		if (raw_spin_trylock(&head->lock)) {
39d8f0d1026a990 Song Liu           2020-10-05  168  			node = head->first;
39d8f0d1026a990 Song Liu           2020-10-05  169  			if (node) {
39d8f0d1026a990 Song Liu           2020-10-05  170  				head->first = node->next;
39d8f0d1026a990 Song Liu           2020-10-05  171  				raw_spin_unlock(&head->lock);
39d8f0d1026a990 Song Liu           2020-10-05  172  				return node;
39d8f0d1026a990 Song Liu           2020-10-05  173  			}
39d8f0d1026a990 Song Liu           2020-10-05  174  			raw_spin_unlock(&head->lock);
39d8f0d1026a990 Song Liu           2020-10-05  175  		}
39d8f0d1026a990 Song Liu           2020-10-05 @176  		cpu = cpumask_next(cpu, cpu_possible_mask);
39d8f0d1026a990 Song Liu           2020-10-05  177  		if (cpu >= nr_cpu_ids)
39d8f0d1026a990 Song Liu           2020-10-05  178  			cpu = 0;
39d8f0d1026a990 Song Liu           2020-10-05  179  		if (cpu == orig_cpu)
39d8f0d1026a990 Song Liu           2020-10-05  180  			break;
39d8f0d1026a990 Song Liu           2020-10-05  181  	}
39d8f0d1026a990 Song Liu           2020-10-05  182  
39d8f0d1026a990 Song Liu           2020-10-05  183  	/* cannot pop from per cpu lists, try extralist */
39d8f0d1026a990 Song Liu           2020-10-05  184  	if (!raw_spin_trylock(&s->extralist.lock))
e19494edab82f55 Alexei Starovoitov 2016-03-07  185  		return NULL;
39d8f0d1026a990 Song Liu           2020-10-05  186  	node = s->extralist.first;
39d8f0d1026a990 Song Liu           2020-10-05  187  	if (node)
39d8f0d1026a990 Song Liu           2020-10-05  188  		s->extralist.first = node->next;
39d8f0d1026a990 Song Liu           2020-10-05  189  	raw_spin_unlock(&s->extralist.lock);
39d8f0d1026a990 Song Liu           2020-10-05  190  	return node;
e19494edab82f55 Alexei Starovoitov 2016-03-07  191  }
39d8f0d1026a990 Song Liu           2020-10-05  192  

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

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

only message in thread, other threads:[~2020-10-15 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 14:54 [linux-next:master 12831/15164] kernel/bpf/percpu_freelist.c:176:17: sparse: sparse: context imbalance in '___pcpu_freelist_pop_nmi' - 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.