Re: Suspend to RAM regression (bisected)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Monday, July 21, 2008 - 10:12 am

On Mon, 21 Jul 2008, Carlos R. Mafra wrote:

Ok, I think this is an oops, and since it's bisected down to the same 
commit that some other oopses were bisected down to at boot-time, it's 
probably the same thing: something is calling "netif_wake_queue()" without 
having called "netif_start_queue()".

Or, to be more precise, in the case of suspending, something has probably 
called "dev_deactivate()" because of a link event or something like that, 
which seems to be a total piece-of-sh*t code that sets the qdisc back to 
the "illegal" noop_qdisc (thus causing oopses if some qdisc event 
happens), but does so *before* al the qdisc's have been quiesced (which it 
must do - because otherwise they may keep coming), so the same problem 
that plagued netif_wake_queue() will happen.

I don't really know the code very well (I'm waiting for David to fix up 
the mess), but I can imagine that the appended patch may at least turn the 
dead machine into a single warning and hopefully a working setup. Can you 
please try?

			Linus

---
 net/core/dev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 2eed17b..43ab4f5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1325,7 +1325,8 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
 
 void __netif_schedule(struct Qdisc *q)
 {
-	BUG_ON(q == &noop_qdisc);
+	if (WARN_ON_ONCE(q == &noop_qdisc))
+		return;
 
 	if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state)) {
 		struct softnet_data *sd;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Suspend to RAM regression (bisected), Linus Torvalds, (Mon Jul 21, 10:12 am)
Re: Suspend to RAM regression (bisected), Carlos R. Mafra, (Mon Jul 21, 11:54 am)