[Linux-kernel-mentees] [PATCH] net: core: sock_map: Use built-in RCU list checking

kbuild test robot lkp at intel.com
Sun Feb 23 01:06:45 UTC 2020


Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.6-rc2 next-20200221]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/madhuparnabhowmik10-gmail-com/net-core-sock_map-Use-built-in-RCU-list-checking/20200223-040222
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0a115e5f23b948be369faf14d3bccab283830f56
config: x86_64-randconfig-a002-20200223 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/workqueue.h:16:0,
                    from include/linux/bpf.h:9,
                    from net/core/sock_map.c:4:
   net/core/sock_map.c: In function 'sock_hash_lookup_elem_raw':
>> net/core/sock_map.c:555:62: error: 'bucket' undeclared (first use in this function)
     hlist_for_each_entry_rcu(elem, head, node, lockdep_is_held(&bucket->lock)) {
                                                                 ^
   include/linux/rcupdate.h:263:52: note: in definition of macro 'RCU_LOCKDEP_WARN'
      if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
                                                       ^
   include/linux/rculist.h:656:7: note: in expansion of macro '__list_check_rcu'
     for (__list_check_rcu(dummy, ## cond, 0),   \
          ^~~~~~~~~~~~~~~~
   include/linux/rculist.h:656:34: note: in expansion of macro 'lockdep_is_held'
     for (__list_check_rcu(dummy, ## cond, 0),   \
                                     ^~~~
   net/core/sock_map.c:555:2: note: in expansion of macro 'hlist_for_each_entry_rcu'
     hlist_for_each_entry_rcu(elem, head, node, lockdep_is_held(&bucket->lock)) {
     ^~~~~~~~~~~~~~~~~~~~~~~~
   net/core/sock_map.c:555:62: note: each undeclared identifier is reported only once for each function it appears in
     hlist_for_each_entry_rcu(elem, head, node, lockdep_is_held(&bucket->lock)) {
                                                                 ^
   include/linux/rcupdate.h:263:52: note: in definition of macro 'RCU_LOCKDEP_WARN'
      if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
                                                       ^
   include/linux/rculist.h:656:7: note: in expansion of macro '__list_check_rcu'
     for (__list_check_rcu(dummy, ## cond, 0),   \
          ^~~~~~~~~~~~~~~~
   include/linux/rculist.h:656:34: note: in expansion of macro 'lockdep_is_held'
     for (__list_check_rcu(dummy, ## cond, 0),   \
                                     ^~~~
   net/core/sock_map.c:555:2: note: in expansion of macro 'hlist_for_each_entry_rcu'
     hlist_for_each_entry_rcu(elem, head, node, lockdep_is_held(&bucket->lock)) {
     ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/bucket +555 net/core/sock_map.c

   548	
   549	static struct bpf_htab_elem *
   550	sock_hash_lookup_elem_raw(struct hlist_head *head, u32 hash, void *key,
   551				  u32 key_size)
   552	{
   553		struct bpf_htab_elem *elem;
   554	
 > 555		hlist_for_each_entry_rcu(elem, head, node, lockdep_is_held(&bucket->lock)) {
   556			if (elem->hash == hash &&
   557			    !memcmp(&elem->key, key, key_size))
   558				return elem;
   559		}
   560	
   561		return NULL;
   562	}
   563	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 31969 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20200223/734db3c6/attachment-0001.gz>


More information about the Linux-kernel-mentees mailing list