mbox series

[SRU,N,0/1] fs/smb: fix unable to list files in share

Message ID 20240926164053.2123925-1-ghadi.rahme@canonical.com
Headers show
Series fs/smb: fix unable to list files in share | expand

Message

Ghadi Elie Rahme Sept. 26, 2024, 4:40 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2082423

[impact]

Currently on the latest version of the 6.8 kernel, there is an issue where listing directories with CIFS fails and returns an error stating that the operation is not permitted.
There is an upstream patch to fix the issue: https://git.kernel.dk/?p=linux-block.git;a=commitdiff;h=ec686804117a0421cf31d54427768aaf93aa0069
And I have back ported to Noble 6.8. Note that the same issue also affects jammy HWE 6.8.

[Test Plan]

1. Create a CIFS share.
2. Populate the CIFS share directory with files.
3. connect to the CIFS share using a ubuntu noble machine or a jammy machine running 6.8 HWE. Steps to connect to a CIFS share can be found here: https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently
4. Once mounted, access the share and try listing the content of the directory with "ls".
5. This will result in the following errors:
ls: cannot access 'file1': Operation not supported
ls: cannot access 'file2': Operation not supported
ls: cannot access 'file3': Operation not supported
ls: cannot access 'file4': Operation not supported

6. Looking at dmesg, the following traces can be seen:
CIFS: VFS: parse_reparse_point: unhandled reparse tag: 0x0000001b
CIFS: fs/smb/client/dir.c: Unexpected lookup error -95

7. The expected output would be to have the files listed wihtout any "operation not supported" errors or dmesg CIFS related error logs.

[Fix]

The fix is already upstream and is provided by:
* ec686804117a smb: client: ignore unhandled reparse tags

The patch does not apply cleanly due to the following missing commit: c520ba7573a8 smb: client: move most of reparse point handling code to common file
So I had to do a few modifications.

[where problems could occur]
* The patch might not fix the issue and it might still be present in some scenarios.
* Other CIFS commands might break.

Paulo Alcantara (1):
  smb: client: ignore unhandled reparse tags

 /fs/smb/client/smb2ops.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Mehmet Basaran Oct. 4, 2024, 5:34 p.m. UTC | #1
Acked-by: Mehmet Basaran <mehmet.basaran@canonical.com>
Ghadi Elie Rahme <ghadi.rahme@canonical.com> writes:

> BugLink: https://bugs.launchpad.net/bugs/2082423
>
> [impact]
>
> Currently on the latest version of the 6.8 kernel, there is an issue where listing directories with CIFS fails and returns an error stating that the operation is not permitted.
> There is an upstream patch to fix the issue: https://git.kernel.dk/?p=linux-block.git;a=commitdiff;h=ec686804117a0421cf31d54427768aaf93aa0069
> And I have back ported to Noble 6.8. Note that the same issue also affects jammy HWE 6.8.
>
> [Test Plan]
>
> 1. Create a CIFS share.
> 2. Populate the CIFS share directory with files.
> 3. connect to the CIFS share using a ubuntu noble machine or a jammy machine running 6.8 HWE. Steps to connect to a CIFS share can be found here: https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently
> 4. Once mounted, access the share and try listing the content of the directory with "ls".
> 5. This will result in the following errors:
> ls: cannot access 'file1': Operation not supported
> ls: cannot access 'file2': Operation not supported
> ls: cannot access 'file3': Operation not supported
> ls: cannot access 'file4': Operation not supported
>
> 6. Looking at dmesg, the following traces can be seen:
> CIFS: VFS: parse_reparse_point: unhandled reparse tag: 0x0000001b
> CIFS: fs/smb/client/dir.c: Unexpected lookup error -95
>
> 7. The expected output would be to have the files listed wihtout any "operation not supported" errors or dmesg CIFS related error logs.
>
> [Fix]
>
> The fix is already upstream and is provided by:
> * ec686804117a smb: client: ignore unhandled reparse tags
>
> The patch does not apply cleanly due to the following missing commit: c520ba7573a8 smb: client: move most of reparse point handling code to common file
> So I had to do a few modifications.
>
> [where problems could occur]
> * The patch might not fix the issue and it might still be present in some scenarios.
> * Other CIFS commands might break.
>
> Paulo Alcantara (1):
>   smb: client: ignore unhandled reparse tags
>
>  /fs/smb/client/smb2ops.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> -- 
> 2.43.0
>
>
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team