From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Nault Subject: [PATCH net 0/3] l2tp: remove unsafe calls to l2tp_tunnel_find_nth() Date: Thu, 12 Apr 2018 20:50:32 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: James Chapman To: netdev@vger.kernel.org Return-path: Received: from zimbra.alphalink.fr ([217.15.80.77]:40448 "EHLO zimbra.alphalink.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeDLSuf (ORCPT ); Thu, 12 Apr 2018 14:50:35 -0400 Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Using l2tp_tunnel_find_nth() is racy, because the returned tunnel can go away as soon as this function returns. This series introduce l2tp_tunnel_get_nth() as a safe replacement to fixes these races. With this series, all unsafe tunnel/session lookups are finally gone. Guillaume Nault (3): l2tp: hold reference on tunnels in netlink dumps l2tp: hold reference on tunnels printed in pppol2tp proc file l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file net/l2tp/l2tp_core.c | 40 ++++++++++++++++++++-------------------- net/l2tp/l2tp_core.h | 3 ++- net/l2tp/l2tp_debugfs.c | 15 +++++++++++++-- net/l2tp/l2tp_netlink.c | 11 ++++++++--- net/l2tp/l2tp_ppp.c | 24 +++++++++++++++++------- 5 files changed, 60 insertions(+), 33 deletions(-) -- 2.17.0