Skip to contentSkip to conversation

fs/ntfs3: fix $LXDEV xattr lookup

PATCH In review Zhan Xusheng 2 participants 2 messages Mar 27 – Apr 7 NTFS3 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: fix $LXDEV xattr lookup

Use correct xattr name ("$LXDEV") and buffer size when calling ntfs_get_ea(), otherwise the attribute may not be read.

---
 fs/ntfs3/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/xattr.c +1 -1
index 3fffda784892..9eeac0ab2b71 100644
@@ -1031,7 +1031,7 @@ void ntfs_get_wsl_perm(struct inode *inode)
 		i_gid_write(inode, (gid_t)le32_to_cpu(value[1]));
 		inode->i_mode = le32_to_cpu(value[2]);
 
-		if (ntfs_get_ea(inode, "$LXDEV", sizeof("$$LXDEV") - 1,
+		if (ntfs_get_ea(inode, "$LXDEV", sizeof("$LXDEV") - 1,
 				&value[0], sizeof(value),
 				&sz) == sizeof(value[0])) {
 			inode->i_rdev = le32_to_cpu(value[0]);
Signature · 1 line
2.43.0
#1 lore raw
Quoted 24 lines · Zhan Xusheng

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Use correct xattr name ("$LXDEV") and buffer size when calling ntfs_get_ea(), otherwise the attribute may not be read.

---
  fs/ntfs3/xattr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/xattr.c +1 -2
index 3fffda784892..9eeac0ab2b71 100644
@@ -1031,7 +1031,7 @@ void ntfs_get_wsl_perm(struct inode *inode)
                 i_gid_write(inode, (gid_t)le32_to_cpu(value[1]));
                 inode->i_mode = le32_to_cpu(value[2]);
 
-               if (ntfs_get_ea(inode, "$LXDEV", sizeof("$$LXDEV") - 1,
+               if (ntfs_get_ea(inode, "$LXDEV", sizeof("$LXDEV") - 1,
                                 &value[0], sizeof(value),
                                 &sz) == sizeof(value[0])) {
                         inode->i_rdev = le32_to_cpu(value[0]);
--
Quoted 2 lines

2.43.0

Hello,

Thanks, your patch is applied.

Regards,
Konstantin