Re: NULL deref in bnx2 / crashes ? ( was: netconsole leads to stalled CPU task )
From: Sylvain Munaut <hidden>
Date: 2012-08-24 09:50:41
Hi,
quoted
Could you test the following patch?diff --git a/net/core/netpoll.c b/net/core/netpoll.c index ddc453b..ed4d1e4 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c@@ -166,11 +166,18 @@ static int poll_one_napi(struct netpoll_info *npinfo, static void poll_napi(struct net_device *dev) { struct napi_struct *napi; + LIST_HEAD(napi_list); int budget = 16; WARN_ON_ONCE(!irqs_disabled()); - list_for_each_entry(napi, &dev->napi_list, dev_list) { + /* After we enable the IRQ, new entries could be added + * to this list, we need to save it before re-enable + * IRQ. + */ + list_splice_tail(&dev->napi_list, &napi_list); +This one should be list_splice_init()...quoted
+ list_for_each_entry(napi, &napi_list, dev_list) { local_irq_enable(); if (napi->poll_owner != smp_processor_id() && spin_trylock(&napi->poll_lock)) {@@ -187,6 +194,7 @@ static void poll_napi(struct net_device *dev) } local_irq_disable(); } + list_splice_tail(&napi_list, &dev->napi_list); } static void service_arp_queue(struct netpoll_info *npi)
I've just tested this patch on the intel machine and the behavior didn't change.
When I do the netconsole modprobe, it sends a couple of line, the
modprobe hangs and then a couple of second later the whole machine
hangs, with nothing printed on the screen or anything.
Cheers,
Sylvain