GFP_ATOMIC in ipw_rx_queue_replenish
Pierre-Alexandre Meyer <[email protected]> Sat, 6 Dec 2008 19:19:56 +0100
| Newsgroups | gmane.linux.drivers.ipw2100.devel |
|---|---|
| Message-ID | <20081206181956.GD11911@panda> |
Good morning, I was wondering if it is safe to sleep in ipw_rx_queue_replenish()? When resuming from suspend to disk for instance, when memory contention is high, if alloc_skb() fails, it will eventually dump_stack() and show_mem(). The error is not fatal but I was wondering if the GFP_ATOMIC is needed. If not, please consider the following patch: Signed-off-by: Pierre-Alexandre Meyer <[email protected]> diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index dcce354..e5c825b 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -5134,7 +5134,7 @@ static void ipw_rx_queue_replenish(void *data) while (!list_empty(&rxq->rx_used)) { element = rxq->rx_used.next; rxb = list_entry(element, struct ipw_rx_mem_buffer, list); - rxb->skb = alloc_skb(IPW_RX_BUF_SIZE, GFP_ATOMIC); + rxb->skb = alloc_skb(IPW_RX_BUF_SIZE, GFP_KERNEL); if (!rxb->skb) { printk(KERN_CRIT "%s: Can not allocate SKB buffers.\n", priv->net_dev->name); -- Pierre-Alexandre Meyer ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/