Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442552 - >sys-kernel/gentoo-sources-3.3.8 - CIFS VFS: cifs_mount failed w/return code = -22
Summary: >sys-kernel/gentoo-sources-3.3.8 - CIFS VFS: cifs_mount failed w/return code ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard: watch-linux-bugzilla
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-10 06:11 UTC by Alex Miller
Modified: 2013-11-19 18:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info for client (emerge-info.log,4.84 KB, text/plain)
2012-11-10 06:12 UTC, Alex Miller
Details
emerge --info for server (emerge-info-server,4.13 KB, text/plain)
2012-11-10 06:13 UTC, Alex Miller
Details
Log of git bisect between 3.3.8 and 3.4.5 (bisect.log,3.54 KB, text/plain)
2012-11-12 06:46 UTC, Alex Miller
Details
Bisected commit in patch format. (file_442552.txt,43.66 KB, text/plain)
2012-11-12 18:17 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
Later patch that is supposed to fix this, but doesn't. (file_442552.txt,3.08 KB, text/plain)
2012-11-12 18:21 UTC, Tom Wijsman (TomWij) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Miller 2012-11-10 06:11:33 UTC
Mounting a CIFS file share fails with kernels >3.3.8.

The following messages are logged to dmesg:

CIFS VFS: Connecting to DFS root not implemented yet
CIFS VFS: cifs_mount failed w/return code = -22


Reproducible: Always

Steps to Reproduce:
1.Boot with a kernel >3.38
2.Attempt to mount a CIFS file share using a command similar to:
mount -t cifs //192.168.0.1/alex /mnt/server -o user=alex,password=(*edited*)
Actual Results:  
mount: wrong fs type, bad option, bad superblock on //192.168.0.1/alex,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

The following is logged to dmesg:

CIFS VFS: Connecting to DFS root not implemented yet
CIFS VFS: cifs_mount failed w/return code = -22

Expected Results:  
The file share mounts successfully.

The server hosting the file share is a 32-bit Gentoo Linux box with the following package versions:
sys-kernel/gentoo-source-3.5.7
net-fs/samba-3.5.15
Comment 1 Alex Miller 2012-11-10 06:12:12 UTC
Created attachment 329066 [details]
emerge --info for client
Comment 2 Alex Miller 2012-11-10 06:13:35 UTC
Created attachment 329068 [details]
emerge --info for server
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-10 13:54:25 UTC
Hmm, weird. A fix was written to fix this, but that should already in your kernel as 3.5.7 and 3.6.6 are higher than 3.4.5.

http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=releases/3.4.5/cifs-fix-parsing-of-password-mount-option.patch;h=1b2efff3f8bd2cbfb4d5bb43c2acc099eb27beb8;hb=b044f0622abd4abd667bf278d6c0686dd95fca5d

It this sounds like you're triggering another bug in that code.

I can't find more details on this problem occuring post >3.4.5 upstream.

Perhaps this was fixed with 3.4.5 so you might want to try that kernel.

I think the only reliable way to determine where the issue lies for you would be to find the latest kernel for which this still worked and finding the next kernel for which this is broken, then you could perform a git bisect to find the offending commit that broke it for you.

http://wiki.gentoo.org/wiki/Kernel_git-bisect
Comment 4 Alex Miller 2012-11-12 06:46:56 UTC
Created attachment 329300 [details]
Log of git bisect between 3.3.8 and 3.4.5
Comment 5 Alex Miller 2012-11-12 06:48:32 UTC
I completed the bisect and it points to this patch:

8830d7e07a5e38bc47650a7554b7c1cfd49902bf is the first bad commit
commit 8830d7e07a5e38bc47650a7554b7c1cfd49902bf
Author: Sachin Prabhu <sprabhu@redhat.com>
Date:   Fri Mar 23 14:40:56 2012 -0400

    cifs: use standard token parser for mount options
    
    Use the standard token parser instead of the long if condition to parse
    cifs mount options.
    
    This was first proposed by Scott Lovenberg
    http://lists.samba.org/archive/linux-cifs-client/2010-May/006079.html

I have attached a log of the bisect.

Alex
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-12 18:17:02 UTC
Created attachment 329360 [details]
Bisected commit in patch format.

Yeah, this is the commit that introduces all the relevant code there, it's quite big.
Comment 7 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-12 18:21:35 UTC
Created attachment 329362 [details]
Later patch that is supposed to fix this, but doesn't.

And this was then the later patch which attempts to fix the problem from the former, which is present in linus' git repository thus present in kernels from June 2012. I don't see why it's not patched for you though, seems you're hitting a different case here but the problematic commit is a bit too big for me to figure that out and I don't think you can undo the whole code either without breaking things that depend on it.

I'd suggest you to report this upstream (mention the relevant details and the bisected log) at http://bugzilla.kernel.org and reply here with a link for reference. Good luck.
Comment 8 Alex Miller 2012-11-16 00:47:23 UTC
Reported upstream as bug no. 50631 (https://bugzilla.kernel.org/show_bug.cgi?id=50631)