]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ppp: try harder to allocate the deflate buffer
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:50:55 +0000 (18:50 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:50:55 +0000 (18:50 -0800)
We're using a 4-order allocation in there and it can fail.  Change it to just
keep reclaiming memory until something gives.

drivers/net/ppp_deflate.c

index 7b029939be24a7b721b2fb46c8f77f7ec09ac598..e4b075517da521986df912be96b6d256d112eb8e 100644 (file)
@@ -351,7 +351,7 @@ static void *z_decomp_alloc(unsigned char *options, int opt_len)
        state->w_size         = w_size;
        state->strm.next_out  = NULL;
        state->strm.workspace = kmalloc(zlib_inflate_workspacesize(),
-                                       GFP_KERNEL);
+                                       GFP_KERNEL|__GFP_REPEAT);
        if (state->strm.workspace == NULL)
                goto out_free;