summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-3.3/080-prot-release-cb.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-11-29 17:37:18 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-11-29 17:37:18 +0000
commit543c2c27d1dd16ad0025ecd54b543b1187d5609c (patch)
treebf787d5ba238c0591fe1ff3593b417cf88f67553 /target/linux/generic/patches-3.3/080-prot-release-cb.patch
parentdf6727639aa8253b1da051f6a89dc37b45b14ef7 (diff)
downloadmtk-20170518-543c2c27d1dd16ad0025ecd54b543b1187d5609c.zip
mtk-20170518-543c2c27d1dd16ad0025ecd54b543b1187d5609c.tar.gz
mtk-20170518-543c2c27d1dd16ad0025ecd54b543b1187d5609c.tar.bz2
kernel: Add ATM fixes pending upstream merge (queue reduction, race fixes)
Patches about to go into net-next.git Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34410
Diffstat (limited to 'target/linux/generic/patches-3.3/080-prot-release-cb.patch')
-rw-r--r--target/linux/generic/patches-3.3/080-prot-release-cb.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.3/080-prot-release-cb.patch b/target/linux/generic/patches-3.3/080-prot-release-cb.patch
new file mode 100644
index 0000000..8af8a19
--- /dev/null
+++ b/target/linux/generic/patches-3.3/080-prot-release-cb.patch
@@ -0,0 +1,27 @@
+This was added in commit 46d3ceabd8d98ed0ad10f20c595ca784e34786c5 (tcp:
+TCP Small Queues) but we need it for pppoatm too.
+
+--- a/include/net/sock.h
++++ b/include/net/sock.h
+@@ -858,6 +858,8 @@ struct proto {
+ int (*backlog_rcv) (struct sock *sk,
+ struct sk_buff *skb);
+
++ void (*release_cb)(struct sock *sk);
++
+ /* Keeping track of sk's, looking them up, and port selection methods. */
+ void (*hash)(struct sock *sk);
+ void (*unhash)(struct sock *sk);
+--- a/net/core/sock.c
++++ b/net/core/sock.c
+@@ -2159,6 +2159,10 @@ void release_sock(struct sock *sk)
+ spin_lock_bh(&sk->sk_lock.slock);
+ if (sk->sk_backlog.tail)
+ __release_sock(sk);
++
++ if (sk->sk_prot->release_cb)
++ sk->sk_prot->release_cb(sk);
++
+ sk->sk_lock.owned = 0;
+ if (waitqueue_active(&sk->sk_lock.wq))
+ wake_up(&sk->sk_lock.wq);