spurious netconsole: network logging stopped messages

5 messages, 2 authors, 2011-01-06 · open the first message on its own page

spurious netconsole: network logging stopped messages

From: Ferenc Wagner <hidden>
Date: 2011-01-03 17:27:30

Hi,

In a running system, I can load the netconsole module, and gather the
messages on the other side all right. Now if I modprobe dummy and rmmod
dummy, the following message gets logged (via netconsole as well):

netconsole: network logging stopped, interface dummy0 unregistered

although I never asked netconsole to log through dummy0. The problem is
fairly obvious in netconsole_netdev_event() and could probably be fixed
with something like the first attached patch.  I didn't even compile
tested it, though, because the second attached patch made me realise
that I don't quite understand the bridge logic here.  Why should
netconsole stop logging through a bridge device if that loses a slave?
Or do I misunderstand the meaning of NETDEV_BONDING_DESLAVE?

Please Cc me, I'm not subscribed.
-- 
Thanks,
Feri.

[PATCH 0/2] Re: spurious netconsole: network logging stopped messages

From: Ferenc Wagner <hidden>
Date: 2011-01-06 15:47:59

Hi,

I've been running with these two patches for a couple of days now.
I don't understand the bridge case: why should netconsole stop logging
on a bridge device which lost a slave?  Or does NETDEV_BONDING_DESLAVE
mean something else?

Anyway, I think the first patch fixes a real bug and the second makes
the kernel message clearer, independently of its cause.

Regards,
Feri.

Ferenc Wagner (2):
  netconsole: don't announce stopping if nothing happened
  netconsole: clarify stopping message

 drivers/net/netconsole.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

[PATCH 1/2] netconsole: don't announce stopping if nothing happened

From: Ferenc Wagner <hidden>
Date: 2011-01-06 15:48:00

Signed-off-by: Ferenc Wagner <redacted>
---
 drivers/net/netconsole.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 94255f0..b2ad998 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -664,6 +664,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
 	unsigned long flags;
 	struct netconsole_target *nt;
 	struct net_device *dev = ptr;
+	bool stopped = false;
 
 	if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER ||
 	      event == NETDEV_BONDING_DESLAVE || event == NETDEV_GOING_DOWN))
@@ -690,13 +691,14 @@ static int netconsole_netdev_event(struct notifier_block *this,
 			case NETDEV_GOING_DOWN:
 			case NETDEV_BONDING_DESLAVE:
 				nt->enabled = 0;
+				stopped = true;
 				break;
 			}
 		}
 		netconsole_target_put(nt);
 	}
 	spin_unlock_irqrestore(&target_list_lock, flags);
-	if (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE)
+	if (stopped && (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE))
 		printk(KERN_INFO "netconsole: network logging stopped, "
 			"interface %s %s\n",  dev->name,
 			event == NETDEV_UNREGISTER ? "unregistered" : "released slaves");
-- 
1.6.5

[PATCH 2/2] netconsole: clarify stopping message

From: Ferenc Wagner <hidden>
Date: 2011-01-06 15:48:01

Signed-off-by: Ferenc Wagner <redacted>
---
 drivers/net/netconsole.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index b2ad998..dfb67eb 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -699,8 +699,8 @@ static int netconsole_netdev_event(struct notifier_block *this,
 	}
 	spin_unlock_irqrestore(&target_list_lock, flags);
 	if (stopped && (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE))
-		printk(KERN_INFO "netconsole: network logging stopped, "
-			"interface %s %s\n",  dev->name,
+		printk(KERN_INFO "netconsole: network logging stopped on "
+			"interface %s as it %s\n",  dev->name,
 			event == NETDEV_UNREGISTER ? "unregistered" : "released slaves");
 
 done:
-- 
1.6.5

Re: [PATCH 0/2] Re: spurious netconsole: network logging stopped messages

From: David Miller <davem@davemloft.net>
Date: 2011-01-06 19:30:15

From: Ferenc Wagner <redacted>
Date: Thu,  6 Jan 2011 16:11:18 +0100
Hi,

I've been running with these two patches for a couple of days now.
I don't understand the bridge case: why should netconsole stop logging
on a bridge device which lost a slave?  Or does NETDEV_BONDING_DESLAVE
mean something else?

Anyway, I think the first patch fixes a real bug and the second makes
the kernel message clearer, independently of its cause.
Both applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help