diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-12-23 11:15:02 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-12-23 11:15:02 +0000 |
commit | 720afadc7a5069c6580fd2b5140732565261bebf (patch) | |
tree | 70f1eb3594e9a01715c4a7a0b5772d683da8c48d /target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch | |
parent | 8996164e5665fbe08919fd7ebf850b082f4e347a (diff) | |
download | mtk-20170518-720afadc7a5069c6580fd2b5140732565261bebf.zip mtk-20170518-720afadc7a5069c6580fd2b5140732565261bebf.tar.gz mtk-20170518-720afadc7a5069c6580fd2b5140732565261bebf.tar.bz2 |
kernel: backport all current pppoe kernel fixes to 3.18
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 47963
Diffstat (limited to 'target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch')
-rw-r--r-- | target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch b/target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch new file mode 100644 index 0000000..f672c67 --- /dev/null +++ b/target/linux/generic/patches-3.18/081-03-pppoe-drop-pppoe-device-in-pppoe_unbind_sock_work.patch @@ -0,0 +1,28 @@ +From: Felix Fietkau <nbd@openwrt.org> +Date: Sat, 9 May 2015 23:08:38 +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> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + +--- a/drivers/net/ppp/pppoe.c ++++ b/drivers/net/ppp/pppoe.c +@@ -465,6 +465,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); |