mbox series

[net-next,0/3] l2tp: avoid aliasing tunnels socket pointer

Message ID cover.1510346873.git.g.nault@alphalink.fr
Headers show
Series l2tp: avoid aliasing tunnels socket pointer | expand

Message

Guillaume Nault Nov. 10, 2017, 9:06 p.m. UTC
We don't need to copy the tunnel's socket pointer in the pseudo-wire
specific session structures. This uselessly complicates the code
and hampers evolution.

This series was part of an effort to protect tunnels socket pointer
with RCU. But since it provides nice cleanup, I submit it separately.

Guillaume Nault (3):
  l2tp: remove .tunnel_sock from struct l2tp_eth
  l2tp: avoid using ->tunnel_sock for getting session's parent tunnel
  l2tp: remove the .tunnel_sock field from struct pppol2tp_session

 net/l2tp/l2tp_eth.c |  2 --
 net/l2tp/l2tp_ppp.c | 76 +++++++++--------------------------------------------
 2 files changed, 12 insertions(+), 66 deletions(-)

Comments

David Miller Nov. 11, 2017, 1:08 p.m. UTC | #1
From: Guillaume Nault <g.nault@alphalink.fr>
Date: Sat, 11 Nov 2017 06:06:23 +0900

> We don't need to copy the tunnel's socket pointer in the pseudo-wire
> specific session structures. This uselessly complicates the code
> and hampers evolution.
> 
> This series was part of an effort to protect tunnels socket pointer
> with RCU. But since it provides nice cleanup, I submit it separately.

Nice simplification, applied, thanks.