Bug 819775

Summary: mount cifs fails with mount error(22): Invalid argument
Product: [openSUSE] openSUSE 12.3 Reporter: Forgotten User Xa7iedXvKw <forgotten_Xa7iedXvKw>
Component: BasesystemAssignee: David Disseldorp <ddiss>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: forgotten_Xa7iedXvKw, sbrabec
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: strace output

Description Forgotten User Xa7iedXvKw 2013-05-14 12:25:46 UTC
Created attachment 539132 [details]
strace output

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0

When trying to mount as root with this command

mount -t cifs //uni-kiel.de/files/stu/home/unimax36 /mnt -o username=unimax36@mail.uni-kiel.de,password=xyz 

I get an error message :

mount error(22): Invalid argument

The same command does work fine with Ubuntu 10.04 LTS and is mounting as expected.

Executing the mount with strace, the problem is possibly this ?

readlink("/mnt", 0x7fff99c09010, 4096)  = -1 EINVAL (Invalid argument)

/mnt is a valid directory

# ls -al /mnt
insgesamt 8
drwxr-xr-x  2 root root 4096  6. Mai 11:36 .
drwxr-xr-x 25 root root 4096 14. Mai 11:06 ..




Reproducible: Always

Steps to Reproduce:
1. execute mount -t cifs //uni-kiel.de/files/stu/home/unimax36 /mnt -o username=unimax36@mail.uni-kiel.de,password=xyz 

Actual Results:  
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Expected Results:  
Mount of window share under /mnt
Comment 1 Stanislav Brabec 2015-02-18 17:02:59 UTC
Sorry for late reply.

Is it still an issue?

The line
readlink("/mnt", 0x7fff8d81ef20, 4096)  = -1 EINVAL (Invalid argument)
is probably not a source of error. It is caused by canonicalization of paths before mount (to prevent undiscovered double mount).

mount continues, calls mount.cifs. The error was returned by mount.cifs.

Reassigning. Could you check whether it is still an issue?
Comment 2 David Disseldorp 2015-02-18 17:16:23 UTC
Yes, as Stanislav mentioned, please retest with openSUSE 13.2. If you're able to reproduce it, then please provide the cifs.ko debugging information as explained at https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting .
Comment 3 Stanislav Brabec 2015-02-19 13:43:02 UTC
Regarding comment 1: I forgot to explain:

It is correct behavior that readlink() returns EINVAL when started on a directory:

From readlink (3p):

ERRORS
...
       EINVAL The path argument names a file that is not a symbolic link.

You probably will not see this readlink in 13.2. The canonicalization now works in a different way and uses stat() instead.
Comment 4 Forgotten User Xa7iedXvKw 2015-02-23 09:19:38 UTC
It is working fine now with openSUSE 13.2
Comment 5 David Disseldorp 2015-02-23 09:44:19 UTC
(In reply to Henrik Schmidt from comment #4)
> It is working fine now with openSUSE 13.2

Thanks for the feedback Henrik. Closing...