lkml.org 
[lkml]   [2004]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Lockup with 2.6.9-ac15 related to netconsole
Mark Broadbent <markb@wetlettuce.com> :
[...]
> OK, patch applied and spinlock debugging enabled. Testing with eth1
> (r1869) doesn'tyield any additional messages, just the standard
> 'NMI Watchdog detected lockup'.

Does the modified version below trigger _exactly_ the same hang ?

--- net/core/netpoll.c 2004-12-21 13:09:51.000000000 +0100
+++ net/core/netpoll.c 2004-12-21 13:27:01.000000000 +0100
@@ -31,6 +31,8 @@
#define MAX_SKBS 32
#define MAX_UDP_CHUNK 1460

+static int netpoll_kill;
+
static spinlock_t skb_list_lock = SPIN_LOCK_UNLOCKED;
static int nr_skbs;
static struct sk_buff *skbs;
@@ -184,11 +186,21 @@ void netpoll_send_skb(struct netpoll *np

repeat:
if(!np || !np->dev || !netif_running(np->dev)) {
+too_bad:
__kfree_skb(skb);
return;
}

- spin_lock(&np->dev->xmit_lock);
+ if (!spin_trylock(&np->dev->xmit_lock)) {
+ netpoll_kill = 1;
+ goto too_bad;
+ }
+
+ if (netpoll_kill) {
+ if (net_ratelimit())
+ printk(KERN_ERR "netconsole raced");
+ netpoll_kill = 0;
+ }
np->dev->xmit_lock_owner = smp_processor_id();

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2011 Jasper Spaans