[PATCH 1/1] smb: client: ignore unhandled reparse tags
Ghadi Elie Rahme
ghadi.rahme at canonical.com
Thu Sep 26 16:40:53 UTC 2024
From: Paulo Alcantara <pc at manguebit.com>
BugLink: https://bugs.launchpad.net/bugs/2082423
Just ignore reparse points that the client can't parse rather than
bailing out and not opening the file or directory.
Reported-by: Marc <1marc1 at gmail.com>
Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com
Fixes: 539aad7f14da ("smb: client: introduce ->parse_reparse_point()")
Tested-by: Anthony Nandaa (Microsoft) <profnandaa at gmail.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc at manguebit.com>
Signed-off-by: Steve French <stfrench at microsoft.com>
(backported from commit ec686804117a0421cf31d54427768aaf93aa0069)
[ghadi-rahme: Had to adjust the context due to missing commit c520ba7573a84bd37f8803a3beeb8f6f995bf9e1]
signed-off-by: Ghadi Elie Rahme <ghadi.rahme at canonical.com>
---
fs/smb/client/smb2ops.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 0875b1a58289..e8944bd0b918 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -3056,6 +3056,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
u32 plen, struct cifs_sb_info *cifs_sb,
bool unicode, struct cifs_open_info_data *data)
{
+ struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
+
data->reparse.buf = buf;
/* See MS-FSCC 2.1.2 */
@@ -3072,12 +3074,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
case IO_REPARSE_TAG_LX_FIFO:
case IO_REPARSE_TAG_LX_CHR:
case IO_REPARSE_TAG_LX_BLK:
- return 0;
+ break;
default:
- cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n",
- __func__, le32_to_cpu(buf->ReparseTag));
- return -EOPNOTSUPP;
+ cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n",
+ le32_to_cpu(buf->ReparseTag));
+ break;
}
+ return 0;
}
static int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,
--
2.43.0
More information about the kernel-team
mailing list