Commit 632f0d05 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

SUNRPC: Use __func__ in dprintk() in auth_gss.c

Clean up: Some function names have changed, but debugging messages
were never updated.  Automate the construction of the function name
in debugging messages.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent d8af9bc1
...@@ -239,7 +239,7 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct ...@@ -239,7 +239,7 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct
} }
return q; return q;
err: err:
dprintk("RPC: gss_fill_context returning %ld\n", -PTR_ERR(p)); dprintk("RPC: %s returning %ld\n", __func__, -PTR_ERR(p));
return p; return p;
} }
...@@ -301,10 +301,10 @@ __gss_find_upcall(struct rpc_pipe *pipe, uid_t uid) ...@@ -301,10 +301,10 @@ __gss_find_upcall(struct rpc_pipe *pipe, uid_t uid)
if (pos->uid != uid) if (pos->uid != uid)
continue; continue;
atomic_inc(&pos->count); atomic_inc(&pos->count);
dprintk("RPC: gss_find_upcall found msg %p\n", pos); dprintk("RPC: %s found msg %p\n", __func__, pos);
return pos; return pos;
} }
dprintk("RPC: gss_find_upcall found nothing\n"); dprintk("RPC: %s found nothing\n", __func__);
return NULL; return NULL;
} }
...@@ -507,8 +507,8 @@ gss_refresh_upcall(struct rpc_task *task) ...@@ -507,8 +507,8 @@ gss_refresh_upcall(struct rpc_task *task)
struct rpc_pipe *pipe; struct rpc_pipe *pipe;
int err = 0; int err = 0;
dprintk("RPC: %5u gss_refresh_upcall for uid %u\n", task->tk_pid, dprintk("RPC: %5u %s for uid %u\n",
cred->cr_uid); task->tk_pid, __func__, cred->cr_uid);
gss_msg = gss_setup_upcall(task->tk_client, gss_auth, cred); gss_msg = gss_setup_upcall(task->tk_client, gss_auth, cred);
if (PTR_ERR(gss_msg) == -EAGAIN) { if (PTR_ERR(gss_msg) == -EAGAIN) {
/* XXX: warning on the first, under the assumption we /* XXX: warning on the first, under the assumption we
...@@ -539,8 +539,8 @@ gss_refresh_upcall(struct rpc_task *task) ...@@ -539,8 +539,8 @@ gss_refresh_upcall(struct rpc_task *task)
spin_unlock(&pipe->lock); spin_unlock(&pipe->lock);
gss_release_msg(gss_msg); gss_release_msg(gss_msg);
out: out:
dprintk("RPC: %5u gss_refresh_upcall for uid %u result %d\n", dprintk("RPC: %5u %s for uid %u result %d\n",
task->tk_pid, cred->cr_uid, err); task->tk_pid, __func__, cred->cr_uid, err);
return err; return err;
} }
...@@ -553,7 +553,7 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) ...@@ -553,7 +553,7 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
int err = 0; int err = 0;
dprintk("RPC: gss_upcall for uid %u\n", cred->cr_uid); dprintk("RPC: %s for uid %u\n", __func__, cred->cr_uid);
retry: retry:
gss_msg = gss_setup_upcall(gss_auth->client, gss_auth, cred); gss_msg = gss_setup_upcall(gss_auth->client, gss_auth, cred);
if (PTR_ERR(gss_msg) == -EAGAIN) { if (PTR_ERR(gss_msg) == -EAGAIN) {
...@@ -594,8 +594,8 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) ...@@ -594,8 +594,8 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
finish_wait(&gss_msg->waitqueue, &wait); finish_wait(&gss_msg->waitqueue, &wait);
gss_release_msg(gss_msg); gss_release_msg(gss_msg);
out: out:
dprintk("RPC: gss_create_upcall for uid %u result %d\n", dprintk("RPC: %s for uid %u result %d\n",
cred->cr_uid, err); __func__, cred->cr_uid, err);
return err; return err;
} }
...@@ -681,7 +681,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) ...@@ -681,7 +681,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
err: err:
kfree(buf); kfree(buf);
out: out:
dprintk("RPC: gss_pipe_downcall returning %Zd\n", err); dprintk("RPC: %s returning %Zd\n", __func__, err);
return err; return err;
} }
...@@ -747,8 +747,8 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) ...@@ -747,8 +747,8 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg)
struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg); struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg);
if (msg->errno < 0) { if (msg->errno < 0) {
dprintk("RPC: gss_pipe_destroy_msg releasing msg %p\n", dprintk("RPC: %s releasing msg %p\n",
gss_msg); __func__, gss_msg);
atomic_inc(&gss_msg->count); atomic_inc(&gss_msg->count);
gss_unhash_msg(gss_msg); gss_unhash_msg(gss_msg);
if (msg->errno == -ETIMEDOUT) if (msg->errno == -ETIMEDOUT)
...@@ -976,7 +976,7 @@ gss_destroying_context(struct rpc_cred *cred) ...@@ -976,7 +976,7 @@ gss_destroying_context(struct rpc_cred *cred)
static void static void
gss_do_free_ctx(struct gss_cl_ctx *ctx) gss_do_free_ctx(struct gss_cl_ctx *ctx)
{ {
dprintk("RPC: gss_free_ctx\n"); dprintk("RPC: %s\n", __func__);
gss_delete_sec_context(&ctx->gc_gss_ctx); gss_delete_sec_context(&ctx->gc_gss_ctx);
kfree(ctx->gc_wire_ctx.data); kfree(ctx->gc_wire_ctx.data);
...@@ -999,7 +999,7 @@ gss_free_ctx(struct gss_cl_ctx *ctx) ...@@ -999,7 +999,7 @@ gss_free_ctx(struct gss_cl_ctx *ctx)
static void static void
gss_free_cred(struct gss_cred *gss_cred) gss_free_cred(struct gss_cred *gss_cred)
{ {
dprintk("RPC: gss_free_cred %p\n", gss_cred); dprintk("RPC: %s cred=%p\n", __func__, gss_cred);
kfree(gss_cred); kfree(gss_cred);
} }
...@@ -1049,8 +1049,8 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) ...@@ -1049,8 +1049,8 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
struct gss_cred *cred = NULL; struct gss_cred *cred = NULL;
int err = -ENOMEM; int err = -ENOMEM;
dprintk("RPC: gss_create_cred for uid %d, flavor %d\n", dprintk("RPC: %s for uid %d, flavor %d\n",
acred->uid, auth->au_flavor); __func__, acred->uid, auth->au_flavor);
if (!(cred = kzalloc(sizeof(*cred), GFP_NOFS))) if (!(cred = kzalloc(sizeof(*cred), GFP_NOFS)))
goto out_err; goto out_err;
...@@ -1069,7 +1069,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) ...@@ -1069,7 +1069,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
return &cred->gc_base; return &cred->gc_base;
out_err: out_err:
dprintk("RPC: gss_create_cred failed with error %d\n", err); dprintk("RPC: %s failed with error %d\n", __func__, err);
return ERR_PTR(err); return ERR_PTR(err);
} }
...@@ -1127,7 +1127,7 @@ gss_marshal(struct rpc_task *task, __be32 *p) ...@@ -1127,7 +1127,7 @@ gss_marshal(struct rpc_task *task, __be32 *p)
struct kvec iov; struct kvec iov;
struct xdr_buf verf_buf; struct xdr_buf verf_buf;
dprintk("RPC: %5u gss_marshal\n", task->tk_pid); dprintk("RPC: %5u %s\n", task->tk_pid, __func__);
*p++ = htonl(RPC_AUTH_GSS); *p++ = htonl(RPC_AUTH_GSS);
cred_len = p++; cred_len = p++;
...@@ -1253,7 +1253,7 @@ gss_validate(struct rpc_task *task, __be32 *p) ...@@ -1253,7 +1253,7 @@ gss_validate(struct rpc_task *task, __be32 *p)
u32 flav,len; u32 flav,len;
u32 maj_stat; u32 maj_stat;
dprintk("RPC: %5u gss_validate\n", task->tk_pid); dprintk("RPC: %5u %s\n", task->tk_pid, __func__);
flav = ntohl(*p++); flav = ntohl(*p++);
if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE) if ((len = ntohl(*p++)) > RPC_MAX_AUTH_SIZE)
...@@ -1271,20 +1271,20 @@ gss_validate(struct rpc_task *task, __be32 *p) ...@@ -1271,20 +1271,20 @@ gss_validate(struct rpc_task *task, __be32 *p)
if (maj_stat == GSS_S_CONTEXT_EXPIRED) if (maj_stat == GSS_S_CONTEXT_EXPIRED)
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
if (maj_stat) { if (maj_stat) {
dprintk("RPC: %5u gss_validate: gss_verify_mic returned " dprintk("RPC: %5u %s: gss_verify_mic returned error 0x%08x\n",
"error 0x%08x\n", task->tk_pid, maj_stat); task->tk_pid, __func__, maj_stat);
goto out_bad; goto out_bad;
} }
/* We leave it to unwrap to calculate au_rslack. For now we just /* We leave it to unwrap to calculate au_rslack. For now we just
* calculate the length of the verifier: */ * calculate the length of the verifier: */
cred->cr_auth->au_verfsize = XDR_QUADLEN(len) + 2; cred->cr_auth->au_verfsize = XDR_QUADLEN(len) + 2;
gss_put_ctx(ctx); gss_put_ctx(ctx);
dprintk("RPC: %5u gss_validate: gss_verify_mic succeeded.\n", dprintk("RPC: %5u %s: gss_verify_mic succeeded.\n",
task->tk_pid); task->tk_pid, __func__);
return p + XDR_QUADLEN(len); return p + XDR_QUADLEN(len);
out_bad: out_bad:
gss_put_ctx(ctx); gss_put_ctx(ctx);
dprintk("RPC: %5u gss_validate failed.\n", task->tk_pid); dprintk("RPC: %5u %s failed.\n", task->tk_pid, __func__);
return NULL; return NULL;
} }
...@@ -1466,7 +1466,7 @@ gss_wrap_req(struct rpc_task *task, ...@@ -1466,7 +1466,7 @@ gss_wrap_req(struct rpc_task *task,
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
int status = -EIO; int status = -EIO;
dprintk("RPC: %5u gss_wrap_req\n", task->tk_pid); dprintk("RPC: %5u %s\n", task->tk_pid, __func__);
if (ctx->gc_proc != RPC_GSS_PROC_DATA) { if (ctx->gc_proc != RPC_GSS_PROC_DATA) {
/* The spec seems a little ambiguous here, but I think that not /* The spec seems a little ambiguous here, but I think that not
* wrapping context destruction requests makes the most sense. * wrapping context destruction requests makes the most sense.
...@@ -1489,7 +1489,7 @@ gss_wrap_req(struct rpc_task *task, ...@@ -1489,7 +1489,7 @@ gss_wrap_req(struct rpc_task *task,
} }
out: out:
gss_put_ctx(ctx); gss_put_ctx(ctx);
dprintk("RPC: %5u gss_wrap_req returning %d\n", task->tk_pid, status); dprintk("RPC: %5u %s returning %d\n", task->tk_pid, __func__, status);
return status; return status;
} }
...@@ -1604,8 +1604,8 @@ gss_unwrap_resp(struct rpc_task *task, ...@@ -1604,8 +1604,8 @@ gss_unwrap_resp(struct rpc_task *task,
status = gss_unwrap_req_decode(decode, rqstp, p, obj); status = gss_unwrap_req_decode(decode, rqstp, p, obj);
out: out:
gss_put_ctx(ctx); gss_put_ctx(ctx);
dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid, dprintk("RPC: %5u %s returning %d\n",
status); task->tk_pid, __func__, status);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment