NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding
[ Upstream commiteef7314caf] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
193691ff5b
commit
58a1023eb5
1 changed files with 1 additions and 1 deletions
|
|
@ -4166,6 +4166,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) {
|
||||
|
|
@ -4178,7 +4179,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…
Add table
Add a link
Reference in a new issue