Thread (20 messages) flat view 20 messages, 4 authors, 2012-09-17

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help