Messages in this thread Patch in this message | | | Subject | [PATCH] netpoll can lock up on low memory. | From | Steven Rostedt <> | Date | Fri, 05 Aug 2005 10:36:31 -0400 |
| |
Looking at the netpoll routines, I noticed that the find_skb could lockup if the memory is low. This is because the allocations are called with GFP_ATOMIC (since this is in interrupt context) and if it fails, it will continue to fail. This is just by observing the code, I didn't have this actually happen. So if this is not the case, please let me know how it can get out. Otherwise, please accept this patch. Also, as Andi told me, the printk here would probably not show up anyway if this happens with netconsole.
Here I changed it to break out instead of just looping.
-- Steve
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
--- linux-2.6.13-rc3/net/core/netpoll.c.orig 2005-08-05 09:37:00.000000000 -0400 +++ linux-2.6.13-rc3/net/core/netpoll.c 2005-08-05 10:29:32.000000000 -0400 @@ -229,8 +229,9 @@ repeat: } if(!skb) { - count++; - if (once && (count == 1000000)) { + if (count++ == 100000) + return NULL; + if (once) printk("out of netpoll skbs!\n"); once = 0; }
- 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/
| |