aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/auth_gss.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-06-10 18:31:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:08:48 -0400
commit0f38b873aeaae698c3693748438547c8493165fb (patch)
treec858b2a08251c2f5792cf83582697dcd9909b7d8 /net/sunrpc/auth_gss/auth_gss.c
parent7e5f6146609eb9134fac7d1b6bfee43df1732188 (diff)
SUNRPC: Use GFP_NOFS when allocating credentials
Since the credentials may be allocated during the call to rpc_new_task(), which again may be called by a memory allocator... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index cc12d5f5d5da..bf7585b80543 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -146,7 +146,7 @@ simple_get_netobj(const void *p, const void *end, struct xdr_netobj *dest)
146 q = (const void *)((const char *)p + len); 146 q = (const void *)((const char *)p + len);
147 if (unlikely(q > end || q < p)) 147 if (unlikely(q > end || q < p))
148 return ERR_PTR(-EFAULT); 148 return ERR_PTR(-EFAULT);
149 dest->data = kmemdup(p, len, GFP_KERNEL); 149 dest->data = kmemdup(p, len, GFP_NOFS);
150 if (unlikely(dest->data == NULL)) 150 if (unlikely(dest->data == NULL))
151 return ERR_PTR(-ENOMEM); 151 return ERR_PTR(-ENOMEM);
152 dest->len = len; 152 dest->len = len;
@@ -171,7 +171,7 @@ gss_alloc_context(void)
171{ 171{
172 struct gss_cl_ctx *ctx; 172 struct gss_cl_ctx *ctx;
173 173
174 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 174 ctx = kzalloc(sizeof(*ctx), GFP_NOFS);
175 if (ctx != NULL) { 175 if (ctx != NULL) {
176 ctx->gc_proc = RPC_GSS_PROC_DATA; 176 ctx->gc_proc = RPC_GSS_PROC_DATA;
177 ctx->gc_seq = 1; /* NetApp 6.4R1 doesn't accept seq. no. 0 */ 177 ctx->gc_seq = 1; /* NetApp 6.4R1 doesn't accept seq. no. 0 */
@@ -341,7 +341,7 @@ gss_alloc_msg(struct gss_auth *gss_auth, uid_t uid)
341{ 341{
342 struct gss_upcall_msg *gss_msg; 342 struct gss_upcall_msg *gss_msg;
343 343
344 gss_msg = kzalloc(sizeof(*gss_msg), GFP_KERNEL); 344 gss_msg = kzalloc(sizeof(*gss_msg), GFP_NOFS);
345 if (gss_msg != NULL) { 345 if (gss_msg != NULL) {
346 INIT_LIST_HEAD(&gss_msg->list); 346 INIT_LIST_HEAD(&gss_msg->list);
347 rpc_init_wait_queue(&gss_msg->rpc_waitqueue, "RPCSEC_GSS upcall waitq"); 347 rpc_init_wait_queue(&gss_msg->rpc_waitqueue, "RPCSEC_GSS upcall waitq");
@@ -503,7 +503,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
503 if (mlen > MSG_BUF_MAXSIZE) 503 if (mlen > MSG_BUF_MAXSIZE)
504 goto out; 504 goto out;
505 err = -ENOMEM; 505 err = -ENOMEM;
506 buf = kmalloc(mlen, GFP_KERNEL); 506 buf = kmalloc(mlen, GFP_NOFS);
507 if (!buf) 507 if (!buf)
508 goto out; 508 goto out;
509 509
@@ -806,7 +806,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
806 dprintk("RPC: gss_create_cred for uid %d, flavor %d\n", 806 dprintk("RPC: gss_create_cred for uid %d, flavor %d\n",
807 acred->uid, auth->au_flavor); 807 acred->uid, auth->au_flavor);
808 808
809 if (!(cred = kzalloc(sizeof(*cred), GFP_KERNEL))) 809 if (!(cred = kzalloc(sizeof(*cred), GFP_NOFS)))
810 goto out_err; 810 goto out_err;
811 811
812 rpcauth_init_cred(&cred->gc_base, acred, auth, &gss_credops); 812 rpcauth_init_cred(&cred->gc_base, acred, auth, &gss_credops);