Messages in this thread Patch in this message | | | Date | Tue, 21 Dec 2004 23:58:31 +0100 | From | Francois Romieu <> | Subject | Re: Lockup with 2.6.9-ac15 related to netconsole |
| |
Matt Mackall <mpm@selenic.com> : [...] > I think it's the promiscuous mode message itself that's the problem
Yes. dev_mc_add takes dev->xmit_lock and the game is over.
Marc, if the patch below happens to work, it should not drop messages like the previous one (it is an ugly short-term suggestion).
--- net/core/netpoll.c 2004-12-21 13:09:51.000000000 +0100 +++ net/core/netpoll.c 2004-12-21 23:35:25.000000000 +0100 @@ -22,6 +22,7 @@ #include <net/tcp.h> #include <net/udp.h> #include <asm/unaligned.h> +#include <net/pkt_sched.h> /* * We maintain a small pool of fully-sized skbs, to make sure the @@ -184,11 +187,19 @@ void netpoll_send_skb(struct netpoll *np repeat: if(!np || !np->dev || !netif_running(np->dev)) { __kfree_skb(skb); return; } - spin_lock(&np->dev->xmit_lock); + while (!spin_trylock(&np->dev->xmit_lock)) { + if (np->dev->xmit_lock_owner == smp_processor_id()) { + struct Qdisc *q = dev->qdisc; + + q->ops->enqueue(skb, q); + return; + } + } + 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/
| |