netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Badalian Vyacheslav <slavon@bigtelecom.ru>
Cc: netdev@vger.kernel.org
Subject: Re: Tc bug (kernel crash) more info
Date: Fri, 31 Aug 2007 11:05:09 +0200	[thread overview]
Message-ID: <20070831090509.GC1772@ff.dom.local> (raw)
In-Reply-To: <46D7D072.5060508@bigtelecom.ru>

On Fri, Aug 31, 2007 at 12:25:22PM +0400, Badalian Vyacheslav wrote:
> i not have testing mashine.
> we have 2 mashine and dynamic routing. if 1 mashine down - all traffic 
> go to second mashine.
> I can test is on this mashines but i need that testing mashine will 
> reboot on kernel panic (sysctl message). No freezes =)
> 
> Ok. i try 2.6.23-rc4.

...but without testing machine it can be too much risk! New versions
of kernel can break your applications (sometimes they should be at
least rebuilded).

So, maybe you would better try this, 'less testing', version of my patch:

Jarek P.

---

diff -Nurp linux-2.6.22.5-/net/sched/sch_htb.c linux-2.6.22.5/net/sched/sch_htb.c
--- linux-2.6.22.5-/net/sched/sch_htb.c	2007-07-09 01:32:17.000000000 +0200
+++ linux-2.6.22.5/net/sched/sch_htb.c	2007-08-31 08:43:45.000000000 +0200
@@ -688,7 +688,11 @@ static void htb_rate_timer(unsigned long
 
 
 	/* lock queue so that we can muck with it */
-	spin_lock_bh(&sch->dev->queue_lock);
+	if (!spin_trylock_bh(&sch->dev->queue_lock)) {
+		q->rttim.expires = jiffies + 1;
+		add_timer(&q->rttim);
+		return;
+	}
 
 	q->rttim.expires = jiffies + HZ;
 	add_timer(&q->rttim);
@@ -1306,7 +1310,8 @@ static void htb_destroy(struct Qdisc *sc
 
 	qdisc_watchdog_cancel(&q->watchdog);
 #ifdef HTB_RATECM
-	del_timer_sync(&q->rttim);
+	if (!del_timer_sync(&q->rttim))
+		del_timer(&q->rttim);
 #endif
 	/* This line used to be after htb_destroy_class call below
 	   and surprisingly it worked in 2.4. But it must precede it

  parent reply	other threads:[~2007-08-31  9:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29  9:34 Tc bug (kernel crash) more info Badalian Vyacheslav
2007-08-29 11:34 ` Jarek Poplawski
2007-08-29 12:14   ` Jarek Poplawski
2007-08-29 12:53     ` Badalian Vyacheslav
2007-08-29 13:30       ` Jarek Poplawski
2007-08-29 20:16         ` slavon
2007-08-30  6:31           ` Jarek Poplawski
2007-08-30  7:27             ` Jarek Poplawski
2007-08-30  9:09               ` Badalian Vyacheslav
2007-08-30 12:37                 ` Jarek Poplawski
2007-08-30 13:43                   ` Badalian Vyacheslav
2007-08-31  7:04                   ` Badalian Vyacheslav
2007-08-31  7:59                     ` Jarek Poplawski
2007-08-31  8:25                       ` Badalian Vyacheslav
2007-08-31  8:49                         ` Jarek Poplawski
2007-08-31  9:05                         ` Jarek Poplawski [this message]
2007-08-31  9:16                           ` Jarek Poplawski
2007-08-31  9:33                           ` Badalian Vyacheslav
2007-08-31 10:17                             ` Jarek Poplawski
2007-08-31 10:48                               ` Badalian Vyacheslav
2007-08-31 12:59                                 ` Jarek Poplawski
2007-08-31 14:31                                   ` Badalian Vyacheslav
2007-08-31 14:51                                     ` Badalian Vyacheslav
     [not found]                                       ` <20070831215850.zf2xi256o00owk4s@mail.himki.net>
2007-09-01 10:36                                         ` slavon
2007-09-03  7:31                                       ` Jarek Poplawski
2007-09-03  8:05                                         ` Badalian Vyacheslav
2007-09-03  8:31                                           ` Badalian Vyacheslav
2007-09-03  9:12                                             ` Jarek Poplawski
2007-08-31 10:50                               ` Badalian Vyacheslav
2007-08-31 10:59                                 ` Badalian Vyacheslav
2007-08-31 11:28                                   ` Jarek Poplawski
2007-08-31 12:14                                     ` Badalian Vyacheslav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070831090509.GC1772@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=netdev@vger.kernel.org \
    --cc=slavon@bigtelecom.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).