netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ehea: Allocate stats buffer with GFP_KERNEL
@ 2010-06-30 21:59 Brian King
  2010-07-02  5:48 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Brian King @ 2010-06-30 21:59 UTC (permalink / raw)
  To: ossthema; +Cc: osstklei, raisch, netdev, brking


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>
---

 drivers/net/ehea/ehea_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/net/ehea/ehea_main.c~ehea_get_stats_gfp drivers/net/ehea/ehea_main.c
--- linux-2.6/drivers/net/ehea/ehea_main.c~ehea_get_stats_gfp	2010-06-28 09:46:51.000000000 -0500
+++ linux-2.6-bjking1/drivers/net/ehea/ehea_main.c	2010-06-28 09:46:51.000000000 -0500
@@ -335,7 +335,7 @@ static struct net_device_stats *ehea_get
 
 	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;
_

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-19  7:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 21:59 [PATCH 1/1] ehea: Allocate stats buffer with GFP_KERNEL Brian King
2010-07-02  5:48 ` David Miller
2010-08-18 14:10   ` Eric Dumazet
2010-08-18 17:49     ` Jay Vosburgh
2010-08-19  7:53       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).