SUNRPC: Use GFP_NOFS when allocating credentials
[linux-2.6-block.git] / net / sunrpc / auth_gss / gss_krb5_mech.c
index 60c3dba545d7c8287cc17a00251e7fe43dad9e27..ef45eba22485cf355c8fdd17382943d7ff7ec602 100644 (file)
@@ -70,7 +70,7 @@ simple_get_netobj(const void *p, const void *end, struct xdr_netobj *res)
        q = (const void *)((const char *)p + len);
        if (unlikely(q > end || q < p))
                return ERR_PTR(-EFAULT);
-       res->data = kmemdup(p, len, GFP_KERNEL);
+       res->data = kmemdup(p, len, GFP_NOFS);
        if (unlikely(res->data == NULL))
                return ERR_PTR(-ENOMEM);
        res->len = len;
@@ -131,7 +131,7 @@ gss_import_sec_context_kerberos(const void *p,
        struct  krb5_ctx *ctx;
        int tmp;
 
-       if (!(ctx = kzalloc(sizeof(*ctx), GFP_KERNEL)))
+       if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS)))
                goto out_err;
 
        p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate));