lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Feb 2018 11:37:31 +0800
From:   kbuild test robot <lkp@...el.com>
To:     James Chapman <jchapman@...alix.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 07/16] l2tp: hide sessions if they are closing

Hi James,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/James-Chapman/l2tp-fix-API-races-discovered-by-syzbot/20180212-102613
config: i386-randconfig-x079-201806 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/James-Chapman/l2tp-fix-API-races-discovered-by-syzbot/20180212-102613 HEAD 0b6885922178c50183cc441ee2b0e2346292de81 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   net/l2tp/l2tp_core.c: In function 'l2tp_tunnel_closeall':
>> net/l2tp/l2tp_core.c:1266:36: error: 'struct l2tp_session' has no member named 'dead'
       if (test_and_set_bit(0, &session->dead))
                                       ^~

vim +1266 net/l2tp/l2tp_core.c

fd558d18 James Chapman   2010-04-02  1240  
fd558d18 James Chapman   2010-04-02  1241  /* When the tunnel is closed, all the attached sessions need to go too.
fd558d18 James Chapman   2010-04-02  1242   */
e34f4c70 Tom Parkin      2013-03-19  1243  void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
fd558d18 James Chapman   2010-04-02  1244  {
fd558d18 James Chapman   2010-04-02  1245  	int hash;
fd558d18 James Chapman   2010-04-02  1246  	struct hlist_node *walk;
fd558d18 James Chapman   2010-04-02  1247  	struct hlist_node *tmp;
fd558d18 James Chapman   2010-04-02  1248  	struct l2tp_session *session;
fd558d18 James Chapman   2010-04-02  1249  
fd558d18 James Chapman   2010-04-02  1250  	BUG_ON(tunnel == NULL);
fd558d18 James Chapman   2010-04-02  1251  
a4ca44fa Joe Perches     2012-05-16  1252  	l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n",
a4ca44fa Joe Perches     2012-05-16  1253  		  tunnel->name);
fd558d18 James Chapman   2010-04-02  1254  
fd558d18 James Chapman   2010-04-02  1255  	write_lock_bh(&tunnel->hlist_lock);
fd558d18 James Chapman   2010-04-02  1256  	for (hash = 0; hash < L2TP_HASH_SIZE; hash++) {
fd558d18 James Chapman   2010-04-02  1257  again:
fd558d18 James Chapman   2010-04-02  1258  		hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
fd558d18 James Chapman   2010-04-02  1259  			session = hlist_entry(walk, struct l2tp_session, hlist);
fd558d18 James Chapman   2010-04-02  1260  
a4ca44fa Joe Perches     2012-05-16  1261  			l2tp_info(session, L2TP_MSG_CONTROL,
fd558d18 James Chapman   2010-04-02  1262  				  "%s: closing session\n", session->name);
fd558d18 James Chapman   2010-04-02  1263  
fd558d18 James Chapman   2010-04-02  1264  			hlist_del_init(&session->hlist);
fd558d18 James Chapman   2010-04-02  1265  
b228a940 Guillaume Nault 2017-09-22 @1266  			if (test_and_set_bit(0, &session->dead))
b228a940 Guillaume Nault 2017-09-22  1267  				goto again;
b228a940 Guillaume Nault 2017-09-22  1268  
fd558d18 James Chapman   2010-04-02  1269  			write_unlock_bh(&tunnel->hlist_lock);
fd558d18 James Chapman   2010-04-02  1270  
f6e16b29 Tom Parkin      2013-03-19  1271  			__l2tp_session_unhash(session);
4c6e2fd3 Tom Parkin      2013-03-19  1272  			l2tp_session_queue_purge(session);
4c6e2fd3 Tom Parkin      2013-03-19  1273  
fd558d18 James Chapman   2010-04-02  1274  			if (session->session_close != NULL)
fd558d18 James Chapman   2010-04-02  1275  				(*session->session_close)(session);
fd558d18 James Chapman   2010-04-02  1276  
9980d001 Tom Parkin      2013-03-19  1277  			l2tp_session_dec_refcount(session);
9980d001 Tom Parkin      2013-03-19  1278  
fd558d18 James Chapman   2010-04-02  1279  			write_lock_bh(&tunnel->hlist_lock);
fd558d18 James Chapman   2010-04-02  1280  
fd558d18 James Chapman   2010-04-02  1281  			/* Now restart from the beginning of this hash
fd558d18 James Chapman   2010-04-02  1282  			 * chain.  We always remove a session from the
fd558d18 James Chapman   2010-04-02  1283  			 * list so we are guaranteed to make forward
fd558d18 James Chapman   2010-04-02  1284  			 * progress.
fd558d18 James Chapman   2010-04-02  1285  			 */
fd558d18 James Chapman   2010-04-02  1286  			goto again;
fd558d18 James Chapman   2010-04-02  1287  		}
fd558d18 James Chapman   2010-04-02  1288  	}
fd558d18 James Chapman   2010-04-02  1289  	write_unlock_bh(&tunnel->hlist_lock);
fd558d18 James Chapman   2010-04-02  1290  }
e34f4c70 Tom Parkin      2013-03-19  1291  EXPORT_SYMBOL_GPL(l2tp_tunnel_closeall);
fd558d18 James Chapman   2010-04-02  1292  

:::::: The code at line 1266 was first introduced by commit
:::::: b228a94066406b6c456321d69643b0d7ce11cfa6 l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()

:::::: TO: Guillaume Nault <g.nault@...halink.fr>
:::::: CC: David S. Miller <davem@...emloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (34626 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ