X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=fs%2Fcifs%2Fcifs_spnego.c;h=a3e932547617ea016ebb59ff2c9aa738d157153b;hb=5497e7b8967118ee45f8ef2d301fce919a35d660;hp=10e7747612992bcc25706851c9027762e2fc134d;hpb=86652188f345edec56b0074a65f6db17f16eb359;p=deliverable%2Flinux.git diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 10e774761299..a3e932547617 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c @@ -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