diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2007-07-10 15:19:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:50 -0400 |
commit | d8558f99fbc5ef5d4ae76b893784005056450f82 (patch) | |
tree | 993e2460295fcdc83c8f9ad755790aa066cd0f94 /net/sunrpc/auth_gss | |
parent | 137d6acaa64afa4cf3d977417424e731ea04705a (diff) |
sunrpc: drop BKL around wrap and unwrap
We don't need the BKL when wrapping and unwrapping; and experiments by Avishay
Traeger have found that permitting multiple encryption and decryption
operations to proceed in parallel can provide significant performance
improvements.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Avishay Traeger <atraeger@cs.sunysb.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 17d460f85f0e..baf4096d52d4 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -999,7 +999,9 @@ gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
999 | offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; | 999 | offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; |
1000 | *p++ = htonl(rqstp->rq_seqno); | 1000 | *p++ = htonl(rqstp->rq_seqno); |
1001 | 1001 | ||
1002 | lock_kernel(); | ||
1002 | status = encode(rqstp, p, obj); | 1003 | status = encode(rqstp, p, obj); |
1004 | unlock_kernel(); | ||
1003 | if (status) | 1005 | if (status) |
1004 | return status; | 1006 | return status; |
1005 | 1007 | ||
@@ -1093,7 +1095,9 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, | |||
1093 | offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; | 1095 | offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base; |
1094 | *p++ = htonl(rqstp->rq_seqno); | 1096 | *p++ = htonl(rqstp->rq_seqno); |
1095 | 1097 | ||
1098 | lock_kernel(); | ||
1096 | status = encode(rqstp, p, obj); | 1099 | status = encode(rqstp, p, obj); |
1100 | unlock_kernel(); | ||
1097 | if (status) | 1101 | if (status) |
1098 | return status; | 1102 | return status; |
1099 | 1103 | ||
@@ -1152,12 +1156,16 @@ gss_wrap_req(struct rpc_task *task, | |||
1152 | /* The spec seems a little ambiguous here, but I think that not | 1156 | /* The spec seems a little ambiguous here, but I think that not |
1153 | * wrapping context destruction requests makes the most sense. | 1157 | * wrapping context destruction requests makes the most sense. |
1154 | */ | 1158 | */ |
1159 | lock_kernel(); | ||
1155 | status = encode(rqstp, p, obj); | 1160 | status = encode(rqstp, p, obj); |
1161 | unlock_kernel(); | ||
1156 | goto out; | 1162 | goto out; |
1157 | } | 1163 | } |
1158 | switch (gss_cred->gc_service) { | 1164 | switch (gss_cred->gc_service) { |
1159 | case RPC_GSS_SVC_NONE: | 1165 | case RPC_GSS_SVC_NONE: |
1166 | lock_kernel(); | ||
1160 | status = encode(rqstp, p, obj); | 1167 | status = encode(rqstp, p, obj); |
1168 | unlock_kernel(); | ||
1161 | break; | 1169 | break; |
1162 | case RPC_GSS_SVC_INTEGRITY: | 1170 | case RPC_GSS_SVC_INTEGRITY: |
1163 | status = gss_wrap_req_integ(cred, ctx, encode, | 1171 | status = gss_wrap_req_integ(cred, ctx, encode, |
@@ -1273,7 +1281,9 @@ gss_unwrap_resp(struct rpc_task *task, | |||
1273 | cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) | 1281 | cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) |
1274 | + (savedlen - head->iov_len); | 1282 | + (savedlen - head->iov_len); |
1275 | out_decode: | 1283 | out_decode: |
1284 | lock_kernel(); | ||
1276 | status = decode(rqstp, p, obj); | 1285 | status = decode(rqstp, p, obj); |
1286 | unlock_kernel(); | ||
1277 | out: | 1287 | out: |
1278 | gss_put_ctx(ctx); | 1288 | gss_put_ctx(ctx); |
1279 | dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid, | 1289 | dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid, |