Skip to content

Commit 9ecabb4

Browse files
committed
NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Trond Myklebust <trond.myklebust@hammerspace.com> commit eef7314 We need to clear the FATTR4_WORD2_SECURITY_LABEL bitmap flag irrespective of whether or not the label is too long. Fixes: aa9c266 ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> (cherry picked from commit eef7314) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 8b62486 commit 9ecabb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs4xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4218,6 +4218,7 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
42184218
p = xdr_inline_decode(xdr, len);
42194219
if (unlikely(!p))
42204220
return -EIO;
4221+
bitmap[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
42214222
if (len < NFS4_MAXLABELLEN) {
42224223
if (label && label->len) {
42234224
if (label->len < len)
@@ -4228,7 +4229,6 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
42284229
label->lfs = lfs;
42294230
status = NFS_ATTR_FATTR_V4_SECURITY_LABEL;
42304231
}
4231-
bitmap[2] &= ~FATTR4_WORD2_SECURITY_LABEL;
42324232
} else
42334233
printk(KERN_WARNING "%s: label too long (%u)!\n",
42344234
__func__, len);

0 commit comments

Comments
 (0)