CC: [email protected]
TO: Andrew Sy Kim <[email protected]>
CC: 0day robot <[email protected]>

tree:   
https://github.com/0day-ci/linux/commits/UPDATE-20200609-013614/Andrew-Sy-Kim/netfilter-ipvs-expire-no-destination-UDP-connections-when-expire_nodest_conn-1/20200515-093828
head:   f0365de6e00edf0b24c916b9e7ced5e468b101ce
commit: f0365de6e00edf0b24c916b9e7ced5e468b101ce [1/1] netfilter/ipvs: queue 
delayed work to expire no destination connections if expire_nodest_conn=1
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: i386-randconfig-s002-20200608 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-247-gcadbd124-dirty
        git checkout f0365de6e00edf0b24c916b9e7ced5e468b101ce
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)

>> net/netfilter/ipvs/ip_vs_conn.c:1371:6: sparse: sparse: context imbalance in 
>> 'ip_vs_expire_nodest_conn_flush' - wrong count at exit

# 
https://github.com/0day-ci/linux/commit/f0365de6e00edf0b24c916b9e7ced5e468b101ce
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout f0365de6e00edf0b24c916b9e7ced5e468b101ce
vim +/ip_vs_expire_nodest_conn_flush +1371 net/netfilter/ipvs/ip_vs_conn.c

f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1369  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1370  #ifdef CONFIG_SYSCTL
f0365de6e00edf0 Andrew Sy Kim 2020-06-08 @1371  void 
ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1372  {
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1373          int idx;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1374          struct ip_vs_conn *cp, 
*cp_c;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1375          struct ip_vs_dest *dest;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1376  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1377          rcu_read_lock();
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1378          for (idx = 0; idx < 
ip_vs_conn_tab_size; idx++) {
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1379                  
hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) {
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1380                          if 
(cp->ipvs != ipvs)
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1381                                  
continue;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1382  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1383                          dest = 
cp->dest;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1384                          if 
(!dest || (dest->flags & IP_VS_DEST_F_AVAILABLE))
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1385                                  
continue;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1386  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1387                          /* As 
timers are expired in LIFO order, restart
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1388                           * the 
timer of controlling connection first, so
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1389                           * that 
it is expired after us.
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1390                           */
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1391                          cp_c = 
cp->control;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1392                          /* 
cp->control is valid only with reference to cp */
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1393                          if 
(cp_c && __ip_vs_conn_get(cp)) {
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1394                                  
IP_VS_DBG(4, "del controlling connection\n");
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1395                                  
ip_vs_conn_expire_now(cp_c);
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1396                                  
__ip_vs_conn_put(cp);
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1397                          }
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1398  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1399                          
IP_VS_DBG(4, "del connection\n");
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1400                          
ip_vs_conn_expire_now(cp);
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1401                  }
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1402                  
cond_resched_rcu();
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1403  
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1404                  /* netns clean 
up started, aborted delayed work */
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1405                  if 
(!ipvs->enable)
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1406                          return;
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1407          }
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1408          rcu_read_unlock();
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1409  }
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1410  #endif
f0365de6e00edf0 Andrew Sy Kim 2020-06-08  1411  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to