mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding
We need to clear the FATTR4_WORD2_SECURITY_LABEL bitmap flag
irrespective of whether or not the label is too long.
Fixes: aa9c266962
("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
0eb43812c0
commit
eef7314caf
@ -4234,6 +4234,7 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
|
||||
p = xdr_inline_decode(xdr, len);
|
||||
if (unlikely(!p))
|
||||
return -EIO;
|
||||
bitmap[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
|
||||
if (len < NFS4_MAXLABELLEN) {
|
||||
if (label) {
|
||||
if (label->len) {
|
||||
@ -4246,7 +4247,6 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
|
||||
label->lfs = lfs;
|
||||
status = NFS_ATTR_FATTR_V4_SECURITY_LABEL;
|
||||
}
|
||||
bitmap[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
|
||||
} else
|
||||
printk(KERN_WARNING "%s: label too long (%u)!\n",
|
||||
__func__, len);
|
||||
|
Loading…
Reference in New Issue
Block a user