summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorFrank Sorenson <sorenson@redhat.com>2026-08-20 16:22:10 -0500
committerPaulo Alcantara <pc@manguebit.org>2026-08-24 17:08:53 -0300
commit5d14030b46af1a958fd104b020fbb93631c98822 (patch)
treea0586486ec3d0545e0304da8218986d69c508703 /fs
parent019716ca2633998c0e9c57df08b4e34d384d4b58 (diff)
smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
The LXDEV block in cifs_query_path_info() uses SMB2_WSL_XATTR_MODE_SIZE (4) instead of SMB2_WSL_XATTR_DEV_SIZE (8), undercounting eas_len by 4 bytes per $LXDEV EA. eas_len is used only as a zero/non-zero presence flag so there is no current functional impact, but the value is incorrect and misleading. Fixes: 97db41604555 ("smb: client: parse uid, gid, mode and dev from WSL reparse points") Cc: stable@vger.kernel.org Cc: Paulo Alcantara <pc@manguebit.org> Signed-off-by: Frank Sorenson <sorenson@redhat.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/smb1ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index 7e2b29060f51..3ac4126267f6 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -721,7 +721,7 @@ static int cifs_query_path_info(const unsigned int xid,
ea->ea_value_length = cpu_to_le16(SMB2_WSL_XATTR_DEV_SIZE);
memcpy(&ea->ea_data[0], SMB2_WSL_XATTR_DEV, SMB2_WSL_XATTR_NAME_LEN + 1);
data->wsl.eas_len += ALIGN(sizeof(*ea) + SMB2_WSL_XATTR_NAME_LEN + 1 +
- SMB2_WSL_XATTR_MODE_SIZE, 4);
+ SMB2_WSL_XATTR_DEV_SIZE, 4);
rc = 0;
} else if (rc >= 0) {
/* It is an error if EA $LXDEV has wrong size. */