aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.18
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-05-09 21:14:41 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-05-09 21:14:41 +0000
commita13783f8c331ca5f02a4a4110f0b9fc3fae02675 (patch)
tree1e500ea3f28e5da21b4a77dd06966e5c2f13df2c /target/linux/generic/patches-3.18
parent3a6cdac37ca224b3345282f8ddfc820dd76543e2 (diff)
downloadupstream-a13783f8c331ca5f02a4a4110f0b9fc3fae02675.tar.gz
upstream-a13783f8c331ca5f02a4a4110f0b9fc3fae02675.tar.bz2
upstream-a13783f8c331ca5f02a4a4110f0b9fc3fae02675.zip
kernel: fix pppoe disconnect issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45653
Diffstat (limited to 'target/linux/generic/patches-3.18')
-rw-r--r--target/linux/generic/patches-3.18/100-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.18/100-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch b/target/linux/generic/patches-3.18/100-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch
new file mode 100644
index 0000000000..c461b3e10c
--- /dev/null
+++ b/target/linux/generic/patches-3.18/100-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch
@@ -0,0 +1,27 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Sat, 9 May 2015 23:03:47 +0200
+Subject: [PATCH] pppoe: drop pppoe device in pppoe_unbind_sock_work
+
+After receiving a PADT and the socket is closed, user space will no
+longer drop the reference to the pppoe device.
+This leads to errors like this:
+
+[ 488.570000] unregister_netdevice: waiting for eth0.2 to become free. Usage count = 2
+
+Fixes: 287f3a943fe ("pppoe: Use workqueue to die properly when a PADT is received")
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -462,6 +462,10 @@ static void pppoe_unbind_sock_work(struc
+ struct sock *sk = sk_pppox(po);
+
+ lock_sock(sk);
++ if (po->pppoe_dev) {
++ dev_put(po->pppoe_dev);
++ po->pppoe_dev = NULL;
++ }
+ pppox_unbind_sock(sk);
+ release_sock(sk);
+ sock_put(sk);