Skip to content

Commit

Permalink
ehea: Allocate stats buffer with GFP_KERNEL
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
bjking1 authored and davem330 committed Jul 2, 2010
1 parent 05318bc commit 3d8009c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d8009c

Please sign in to comment.