Merge branch 'sii-m15w' into upstream
[pandora-kernel.git] / net / sunrpc / auth_gss / gss_krb5_mech.c
index 5f1f806..70e1e53 100644 (file)
@@ -97,13 +97,17 @@ get_key(const void *p, const void *end, struct crypto_tfm **res)
                        alg_mode = CRYPTO_TFM_MODE_CBC;
                        break;
                default:
-                       dprintk("RPC:      get_key: unsupported algorithm %d\n", alg);
+                       printk("gss_kerberos_mech: unsupported algorithm %d\n", alg);
                        goto out_err_free_key;
        }
-       if (!(*res = crypto_alloc_tfm(alg_name, alg_mode)))
+       if (!(*res = crypto_alloc_tfm(alg_name, alg_mode))) {
+               printk("gss_kerberos_mech: unable to initialize crypto algorithm %s\n", alg_name);
                goto out_err_free_key;
-       if (crypto_cipher_setkey(*res, key.data, key.len))
+       }
+       if (crypto_cipher_setkey(*res, key.data, key.len)) {
+               printk("gss_kerberos_mech: error setting key for crypto algorithm %s\n", alg_name);
                goto out_err_free_tfm;
+       }
 
        kfree(key.data);
        return p;
@@ -125,9 +129,8 @@ gss_import_sec_context_kerberos(const void *p,
        const void *end = (const void *)((const char *)p + len);
        struct  krb5_ctx *ctx;
 
-       if (!(ctx = kmalloc(sizeof(*ctx), GFP_KERNEL)))
+       if (!(ctx = kzalloc(sizeof(*ctx), GFP_KERNEL)))
                goto out_err;
-       memset(ctx, 0, sizeof(*ctx));
 
        p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate));
        if (IS_ERR(p))
@@ -165,7 +168,7 @@ gss_import_sec_context_kerberos(const void *p,
        }
 
        ctx_id->internal_ctx_id = ctx;
-       dprintk("RPC:      Succesfully imported new context.\n");
+       dprintk("RPC:      Successfully imported new context.\n");
        return 0;
 
 out_err_free_key2: