mount.cifs fails to mount DFS shares

Bug #1930603 reported by Chris Ritson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

Since the release of the latest kernel (vmlinuz-4.15.0-143-generic), a cifs mount like this fails:-

  mount.cifs --verbose -o 'user=XXX,dom=DOMAIN,vers=3.0,uid=XXX' '//DOMAIN.f.q.d.n/SHARE/FOLDER' /tmp/mount-point

Dropping back to the previous kernel (vmlinuz-4.15.0-142-generic) or locating the DFS share on a windows box and picking its currently active member server both appear to be ways of working-around this particular fault.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-143-generic 4.15.0-143.147
ProcVersionSignature: Ubuntu 4.15.0-143.147-generic 4.15.18
Uname: Linux 4.15.0-143-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.24
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Wed Jun 2 16:55:59 2021
HibernationDevice: RESUME=/dev/mapper/vg--workstation-swap_1
IwConfig:
 ens160 no wireless extensions.

 lo no wireless extensions.

 ens192 no wireless extensions.
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: VMware, Inc. VMware Virtual Platform
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-143-generic root=/dev/mapper/vg--workstation-root ro quiet splash
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-143-generic N/A
 linux-backports-modules-4.15.0-143-generic N/A
 linux-firmware 1.173.19
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/12/2018
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd12/12/2018:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

Revision history for this message
Chris Ritson (chris-r-ritson) wrote :
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi Chris,

Thanks for reporting! Looking at the difference between 4.15.0-142-generic and 4.15.0-143-generic, there is one commit:

ubuntu-bionic$ git log --grep "cifs" Ubuntu-4.15.0-142.146..Ubuntu-4.15.0-143.147
commit 7dd995facbb57b35b10715a27e252c8af5a39a6c
Author: Shyam Prasad N <email address hidden>
Date: Thu Feb 11 03:26:54 2021 -0800

    cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.

    BugLink: https://bugs.launchpad.net/bugs/1919380

    [ Upstream commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b ]

    While debugging another issue today, Steve and I noticed that if a
    subdir for a file share is already mounted on the client, any new
    mount of any other subdir (or the file share root) of the same share
    results in sharing the cifs superblock, which e.g. can result in
    incorrect device name.

    While setting prefix path for the root of a cifs_sb,
    CIFS_MOUNT_USE_PREFIX_PATH flag should also be set.
    Without it, prepath is not even considered in some places,
    and output of "mount" and various /proc/<>/*mount* related
    options can be missing part of the device name.

    Signed-off-by: Shyam Prasad N <email address hidden>
    Reviewed-by: Aurelien Aptel <email address hidden>
    Signed-off-by: Steve French <email address hidden>
    Signed-off-by: Sasha Levin <email address hidden>
    Signed-off-by: Kamal Mostafa <email address hidden>
    Signed-off-by: Kelsey Skunberg <email address hidden>

This has caused problems before, in bug 1923670, where we wrote to upstream and had it reverted from upstream -stable and reverted it from our kernels.

Having a look through the git history, I see the revert actually landed in 4.15.0-144-generic, which has just landed in -updates (but not quite yet in -security).

$ git log --grep "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath." origin/master-next
commit 9f5e9a8722e0a6d1bf46a689ba4541e4377c4b0b
Author: Greg Kroah-Hartman <email address hidden>
Date: Mon Apr 12 09:56:57 2021 +0200

    Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath."

    BugLink: https://bugs.launchpad.net/bugs/1926808

    This reverts commit ad48c641e7c344ae7aba243d3056a22eaba71bfd which is
    commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b upstream.

    It is reported to cause problems in older kernels, so revert it for now
    until we can figure it out...

    Reported-by: Salvatore Bonaccorso <email address hidden>
    Link: https://<email address hidden>
    Cc: Shyam Prasad N <email address hidden>
    Cc: Aurelien Aptel <email address hidden>
    Cc: Steve French <email address hidden>
    Cc: Sasha Levin <email address hidden>
    Signed-off-by: Greg Kroah-Hartman <email address hidden>
    Signed-off-by: Kamal Mostafa <email address hidden>
    Signed-off-by: Stefan Bader <email address hidden>

$ git describe --contains 9f5e9a8722e0a6d1bf46a689ba4541e4377c4b0b
Ubuntu-4.15.0-144.148~25

Could you please try 4.15.0-144-generic and let me know if it fixes it for you? It should be fixed there.

Thanks,
Matthew

Revision history for this message
Chris Ritson (chris-r-ritson) wrote : Re: [Bug 1930603] Re: mount.cifs fails to mount DFS shares
Download full text (8.2 KiB)

Many thanks for investigating. Yes, this does appear to be fixed in 4.15.0-144-generic

--
Chris Ritson

Newcastle University IT Service - School of Computing.
Working mostly from home due to 25% occupancy target for Urban
Sciences Building: https://www.ncl.ac.uk/itservice/remoteworking/

________________________________________
From: <email address hidden> <email address hidden> on behalf of Matthew Ruffell <email address hidden>
Sent: 03 June 2021 04:57
To: Chris Ritson
Subject: [Bug 1930603] Re: mount.cifs fails to mount DFS shares

⚠ External sender. Take care when opening links or attachments. Do not provide your login details.

Hi Chris,

Thanks for reporting! Looking at the difference between
4.15.0-142-generic and 4.15.0-143-generic, there is one commit:

ubuntu-bionic$ git log --grep "cifs" Ubuntu-4.15.0-142.146..Ubuntu-4.15.0-143.147
commit 7dd995facbb57b35b10715a27e252c8af5a39a6c
Author: Shyam Prasad N <email address hidden>
Date: Thu Feb 11 03:26:54 2021 -0800

    cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.

    BugLink: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fbugs%2F1919380&amp;data=04%7C01%7CChris.Ritson%40newcastle.ac.uk%7Cf393674c32b74f499e3e08d92644d8d4%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C637582900140610302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=3a75bQX1lX7Ez1ukWckbpGQff8sGH3qTWje%2FxCaY93E%3D&amp;reserved=0

    [ Upstream commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b ]

    While debugging another issue today, Steve and I noticed that if a
    subdir for a file share is already mounted on the client, any new
    mount of any other subdir (or the file share root) of the same share
    results in sharing the cifs superblock, which e.g. can result in
    incorrect device name.

    While setting prefix path for the root of a cifs_sb,
    CIFS_MOUNT_USE_PREFIX_PATH flag should also be set.
    Without it, prepath is not even considered in some places,
    and output of "mount" and various /proc/<>/*mount* related
    options can be missing part of the device name.

    Signed-off-by: Shyam Prasad N <email address hidden>
    Reviewed-by: Aurelien Aptel <email address hidden>
    Signed-off-by: Steve French <email address hidden>
    Signed-off-by: Sasha Levin <email address hidden>
    Signed-off-by: Kamal Mostafa <email address hidden>
    Signed-off-by: Kelsey Skunberg <email address hidden>

This has caused problems before, in bug 1923670, where we wrote to upstream and had it reverted from upstream -stable and reverted it from our kernels.

Having a look through the git history, I see the revert actually landed
in 4.15.0-144-generic, which has just landed in -updates (but not quite
yet in -security).

$ git log --grep "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath." origin/master-next
commit 9f5e9a8722e0a6d1bf46a689ba4541e4377c4b0b
Author: Greg Kroah-Hartman <email address hidden>
Date: Mon Apr 12 09:56:57 2021 +0200

    Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath."

    BugLink: https://eur03...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.