netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release
@ 2012-09-22  9:53 Xiaodong Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Xiaodong Xu @ 2012-09-22  9:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

From: Xiaodong Xu <stid.smth@gmail.com>

When PPPOE is running over a virtual ethernet interface (e.g., a
bonding interface) and the user tries to delete the interface in case
the PPPOE state is ZOMBIE, the kernel will loop forever while
unregistering net_device for the reference count is not decreased to
zero which should have been done with dev_put().

Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>

---

--- drivers/net/ppp/pppoe.c.orig	2012-09-19 11:49:27.921826868 +0800
+++ drivers/net/ppp/pppoe.c	2012-09-22 17:44:03.642730082 +0800
@@ -570,7 +570,7 @@ static int pppoe_release(struct socket *

 	po = pppox_sk(sk);

-	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
+	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
 		dev_put(po->pppoe_dev);
 		po->pppoe_dev = NULL;
 	}

-- 
Regards,
Xiaodong Xu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release
@ 2012-09-22 10:09 Xiaodong Xu
  2012-09-22 19:51 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaodong Xu @ 2012-09-22 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

From: Xiaodong Xu <stid.smth@gmail.com>

When PPPOE is running over a virtual ethernet interface (e.g., a
bonding interface) and the user tries to delete the interface in case
the PPPOE state is ZOMBIE, the kernel will loop forever while
unregistering net_device for the reference count is not decreased to
zero which should have been done with dev_put().

Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>

---

--- linux/drivers/net/ppp/pppoe.c.orig	2012-09-19 11:49:27.921826868 +0800
+++ linux/drivers/net/ppp/pppoe.c	2012-09-22 17:44:03.642730082 +0800
@@ -570,7 +570,7 @@ static int pppoe_release(struct socket *

 	po = pppox_sk(sk);

-	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
+	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
 		dev_put(po->pppoe_dev);
 		po->pppoe_dev = NULL;
 	}

-- 
Regards,
Xiaodong Xu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release
  2012-09-22 10:09 [PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release Xiaodong Xu
@ 2012-09-22 19:51 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-09-22 19:51 UTC (permalink / raw)
  To: stid.smth; +Cc: linux-kernel, netdev

From: Xiaodong Xu <stid.smth@gmail.com>
Date: Sat, 22 Sep 2012 18:09:32 +0800

> From: Xiaodong Xu <stid.smth@gmail.com>
> 
> When PPPOE is running over a virtual ethernet interface (e.g., a
> bonding interface) and the user tries to delete the interface in case
> the PPPOE state is ZOMBIE, the kernel will loop forever while
> unregistering net_device for the reference count is not decreased to
> zero which should have been done with dev_put().
> 
> Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-22 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-22 10:09 [PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release Xiaodong Xu
2012-09-22 19:51 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2012-09-22  9:53 Xiaodong Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).