All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@suse.de>
To: netdev@oss.sgi.com
Subject: [PATCH] Uninitialized timer in ip_mc_down
Date: Thu, 25 Mar 2004 13:57:55 +0100	[thread overview]
Message-ID: <20040325125755.GA8500@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

Hi,

if you do the following on a downed interface on 2.6, you get two
"uninitialized timer" messages from the kernel, along with a stack trace.

	ip addr add 1.2.3.4 dev eth1
	ip addr del 1.2.3.4 dev eth1

The reason is that inetdev_create calls ip_mc_up if and only if the device
is up. However, inetdev_destroy calls ip_mc_destroy_dev unconditionally,
so that del_timer gets called for the two multicast timers which are
uninitialized.

The attached patch seems to fix this. An alternative patch would
be to add a check to ip_mc_down to see whether the timers are
actually active before deleting them.

Olaf
-- 
Olaf Kirch     |  Stop wasting entropy - start using predictable
okir@suse.de   |  tempfile names today!
---------------+ 

[-- Attachment #2: ipv4-mcast-timer --]
[-- Type: text/plain, Size: 461 bytes --]

--- ../linux-2.6.4.orig/net/ipv4/devinet.c	2004-03-12 12:17:31.000000000 +0100
+++ ../linux-2.6.4/net/ipv4/devinet.c	2004-03-25 13:07:24.000000000 +0100
@@ -183,7 +183,10 @@
 
 	in_dev->dead = 1;
 
-	ip_mc_destroy_dev(in_dev);
+	/* If the device isn't up, the multicast info isn't
+	 * initialized. */
+	if (in_dev->dev->flags & IFF_UP)
+		ip_mc_destroy_dev(in_dev);
 
 	while ((ifa = in_dev->ifa_list) != NULL) {
 		inet_del_ifa(in_dev, &in_dev->ifa_list, 0);

                 reply	other threads:[~2004-03-25 12:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040325125755.GA8500@suse.de \
    --to=okir@suse.de \
    --cc=netdev@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.