Skip to content

Commit 3fafd92

Browse files
committed
Merge branch 'l2tp-session-cleanup' into main
James Chapman says: ==================== l2tp: simplify tunnel and session cleanup This series simplifies and improves l2tp tunnel and session cleanup. * refactor l2tp management code to not use the tunnel socket's sk_user_data. This allows the tunnel and its socket to be closed and freed without sequencing the two using the socket's sk_destruct hook. * export ip_flush_pending_frames and use it when closing l2tp_ip sockets. * move the work of closing all sessions in the tunnel to the work queue so that sessions are deleted using the same codepath whether they are closed by user API request or their parent tunnel is closing. * refactor l2tp_ppp pppox socket / session relationship to have the session keep the socket alive, not the other way around. Previously the pppox socket held a ref on the session, which complicated session delete by having to go through the pppox socket destructor. * free sessions and pppox sockets by rcu. * fix a possible tunnel refcount underflow. * avoid using rcu_barrier in net exit handler. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 0a658d0 + 5dfa598 commit 3fafd92

File tree

8 files changed

+179
-168
lines changed

8 files changed

+179
-168
lines changed

net/ipv4/ip_output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,7 @@ void ip_flush_pending_frames(struct sock *sk)
15341534
{
15351535
__ip_flush_pending_frames(sk, &sk->sk_write_queue, &inet_sk(sk)->cork.base);
15361536
}
1537+
EXPORT_SYMBOL_GPL(ip_flush_pending_frames);
15371538

15381539
struct sk_buff *ip_make_skb(struct sock *sk,
15391540
struct flowi4 *fl4,

0 commit comments

Comments
 (0)