From: J. Bruce Fields Date: Fri, 1 Nov 2013 14:42:15 +0000 (-0400) Subject: nfsd4: fix discarded security labels on setattr X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3378b7f40d79930f0f447a164c7e8fcbe4480e40;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git nfsd4: fix discarded security labels on setattr Security labels in setattr calls are currently ignored because we forget to set label->len. Cc: stable@vger.kernel.org Reported-by: Jeff Layton Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 83db5a742aa9..d9d7fa94967f 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -411,6 +411,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, label->data = kzalloc(dummy32 + 1, GFP_KERNEL); if (!label->data) return nfserr_jukebox; + label->len = dummy32; defer_free(argp, kfree, label->data); memcpy(label->data, buf, dummy32); }