ehea: Allocate stats buffer with GFP_KERNEL
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 30 Jun 2010 11:59:12 +0000 (11:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Jul 2010 05:45:52 +0000 (22:45 -0700)
Since ehea_get_stats calls ehea_h_query_ehea_port, which
can sleep, we can also sleep when allocating a page in
this function. This fixes some memory allocation failure
warnings seen under low memory conditions.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ehea/ehea_main.c

index 8b92acb448c2691e7d2ca4de669c61e4a33677e9..3beba70b7dea5827c45927d2c9b550bb68d148f5 100644 (file)
@@ -335,7 +335,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev)
 
        memset(stats, 0, sizeof(*stats));
 
-       cb2 = (void *)get_zeroed_page(GFP_ATOMIC);
+       cb2 = (void *)get_zeroed_page(GFP_KERNEL);
        if (!cb2) {
                ehea_error("no mem for cb2");
                goto out;