Root/target/linux/generic/patches-3.3/080-prot-release-cb.patch

1This was added in commit 46d3ceabd8d98ed0ad10f20c595ca784e34786c5 (tcp:
2TCP Small Queues) but we need it for pppoatm too.
3
4--- a/include/net/sock.h
5+++ b/include/net/sock.h
6@@ -810,6 +810,8 @@ struct proto {
7     int (*backlog_rcv) (struct sock *sk,
8                         struct sk_buff *skb);
9 
10+ void (*release_cb)(struct sock *sk);
11+
12     /* Keeping track of sk's, looking them up, and port selection methods. */
13     void (*hash)(struct sock *sk);
14     void (*unhash)(struct sock *sk);
15--- a/net/core/sock.c
16+++ b/net/core/sock.c
17@@ -2138,6 +2138,10 @@ void release_sock(struct sock *sk)
18     spin_lock_bh(&sk->sk_lock.slock);
19     if (sk->sk_backlog.tail)
20         __release_sock(sk);
21+
22+ if (sk->sk_prot->release_cb)
23+ sk->sk_prot->release_cb(sk);
24+
25     sk->sk_lock.owned = 0;
26     if (waitqueue_active(&sk->sk_lock.wq))
27         wake_up(&sk->sk_lock.wq);
28

Archive Download this file



interactive