]> Pileus Git - ~andy/linux/blobdiff - fs/cifs/cifs_spnego.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[~andy/linux] / fs / cifs / cifs_spnego.c
index 10e7747612992bcc25706851c9027762e2fc134d..a3e932547617ea016ebb59ff2c9aa738d157153b 100644 (file)
@@ -37,12 +37,11 @@ cifs_spnego_key_instantiate(struct key *key, struct key_preparsed_payload *prep)
        int ret;
 
        ret = -ENOMEM;
-       payload = kmalloc(prep->datalen, GFP_KERNEL);
+       payload = kmemdup(prep->data, prep->datalen, GFP_KERNEL);
        if (!payload)
                goto error;
 
        /* attach the data */
-       memcpy(payload, prep->data, prep->datalen);
        key->payload.data = payload;
        ret = 0;
 
@@ -164,7 +163,7 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo)
        dp = description + strlen(description);
        sprintf(dp, ";pid=0x%x", current->pid);
 
-       cFYI(1, "key description = %s", description);
+       cifs_dbg(FYI, "key description = %s\n", description);
        spnego_key = request_key(&cifs_spnego_key_type, description, "");
 
 #ifdef CONFIG_CIFS_DEBUG2