From 3d8009c780ee90fccb5c171caf30aff839f13547 Mon Sep 17 00:00:00 2001 From: Brian King Date: Wed, 30 Jun 2010 11:59:12 +0000 Subject: ehea: Allocate stats buffer with GFP_KERNEL 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 Signed-off-by: David S. Miller --- drivers/net/ehea/ehea_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ehea') diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 8b92acb448c2..3beba70b7dea 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -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; -- cgit v1.2.3