Whamcloud - gitweb
LU-5710 all: second batch of corrected typos and grammar errors
[fs/lustre-release.git] / lustre / ptlrpc / gss / gss_krb5_mech.c
index d286a71..b43cb04 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  *
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
  *
  * Author: Eric Mei <ericm@clusterfs.com>
  */
@@ -341,7 +341,7 @@ __u32 import_context_rfc1964(struct krb5_ctx *kctx, char *p, char *end)
         if (p != end)
                 goto out_err;
 
-        CDEBUG(D_SEC, "succesfully imported rfc1964 context\n");
+       CDEBUG(D_SEC, "successfully imported rfc1964 context\n");
         return 0;
 out_err:
         return GSS_S_FAILURE;
@@ -403,7 +403,7 @@ __u32 import_context_rfc4121(struct krb5_ctx *kctx, char *p, char *end)
         if (get_keyblock(&p, end, &kctx->kc_keyc, keysize))
                 goto out_err;
 
-        CDEBUG(D_SEC, "succesfully imported v2 context\n");
+       CDEBUG(D_SEC, "successfully imported v2 context\n");
         return 0;
 out_err:
         return GSS_S_FAILURE;
@@ -494,7 +494,7 @@ __u32 gss_copy_reverse_context_kerberos(struct gss_ctx *gctx,
                 goto out_err;
 
         gctx_new->internal_ctx_id = knew;
-        CDEBUG(D_SEC, "succesfully copied reverse context\n");
+       CDEBUG(D_SEC, "successfully copied reverse context\n");
         return GSS_S_COMPLETE;
 
 out_err:
@@ -602,6 +602,7 @@ int krb5_digest_hmac(struct crypto_hash *tfm,
                 if (iovs[i].kiov_len == 0)
                         continue;
 
+               sg_init_table(sg, 1);
                sg_set_page(&sg[0], iovs[i].kiov_page, iovs[i].kiov_len,
                            iovs[i].kiov_offset);
                crypto_hash_update(&desc, sg, iovs[i].kiov_len);
@@ -644,6 +645,7 @@ int krb5_digest_norm(struct crypto_hash *tfm,
                 if (iovs[i].kiov_len == 0)
                         continue;
 
+               sg_init_table(sg, 1);
                sg_set_page(&sg[0], iovs[i].kiov_page, iovs[i].kiov_len,
                            iovs[i].kiov_offset);
                crypto_hash_update(&desc, sg, iovs[i].kiov_len);
@@ -970,12 +972,14 @@ int krb5_encrypt_bulk(struct crypto_blkcipher *tfm,
 
         /* encrypt clear pages */
         for (i = 0; i < desc->bd_iov_count; i++) {
+               sg_init_table(&src, 1);
                sg_set_page(&src, desc->bd_iov[i].kiov_page,
                            (desc->bd_iov[i].kiov_len + blocksize - 1) &
                            (~(blocksize - 1)),
                            desc->bd_iov[i].kiov_offset);
                if (adj_nob)
                        nob += src.length;
+               sg_init_table(&dst, 1);
                sg_set_page(&dst, desc->bd_enc_iov[i].kiov_page, src.length,
                            src.offset);
 
@@ -1094,6 +1098,7 @@ int krb5_decrypt_bulk(struct crypto_blkcipher *tfm,
                 if (desc->bd_enc_iov[i].kiov_len == 0)
                         continue;
 
+               sg_init_table(&src, 1);
                sg_set_page(&src, desc->bd_enc_iov[i].kiov_page,
                            desc->bd_enc_iov[i].kiov_len,
                            desc->bd_enc_iov[i].kiov_offset);