lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 25 Apr 2010 01:11:06 +0200
From:	Christian Eggers <ceggers@....de>
To:	Jeff Layton <jlayton@...hat.com>
Cc:	linux-cifs-client@...ts.samba.org, linux-kernel@...r.kernel.org
Subject: Re: cifs: [solved] Filesystem unmounts automatically after some time

Dear Jeff,

Am Samstag 24 April 2010 04:09:08 schrieb Jeff Layton:
> Christian Eggers <ceggers@....de> wrote:
> > [...]
> > When I mount a remote Samba share with the previous commands, the share
> > gets successfully mounted and is shown in the output of the "mount"
> > command. After some minutes the share is automatically unmounted without
> > any user intervention. Is this a wanted feature or a bug?
> > 
> > I saw this behaviour first on openSUSE 11.2 (shipped with
> > kernel-2.6.31.5) but never on openSUSE 11.1 (kernel-2.6.27.7).
> 
> Sounds like a bug, but I'm not sure if it's in CIFS or even in the
> kernel.
> 
> > [...]
> 
> ...and then the last reference to the superblock was put. I can't be
> certain, but it seems plausible that something in userspace is
> triggering a umount. What may be interesting is to boot the box into
> single-user mode and redo the mount. Does it still end up unmounted
> after a little while?

I've tested in single-user mode (I had to setup the network manually for this). Here the problem doesn't happen.

> It also could be a matter of more vfsmount references being put than
> "got", possibly with the last reference being put in the statfs
> codepath above. This would be the first I've heard of such a problem
> however and would probably not be a cifs-specific issue.


[repeated]
> but it seems plausible that something in userspace is
> triggering a umount.
This was the problem! After this hint I looked into syslog (until this point I had only searched in dmesg output)...

> Apr 24 23:15:49 p2400 dhcpcd[2958]: br0: renewing lease of 192.168.0.40
> Apr 24 23:15:49 p2400 dhcpcd[2958]: br0: leased 192.168.0.40 for 600 seconds 
> Apr 24 23:15:49 p2400 dhcpcd[2958]: br0: adding IP address 192.168.0.40/24 
> Apr 24 23:15:49 p2400 dhcpcd[2958]: br0: adding default route via 192.168.0.1 metric 0 
> Apr 24 23:15:49 p2400 ifup:     br0
> Apr 24 23:15:49 p2400 kernel: [  922.705969] /home/christian/intel/linux-2.6.34-rc/fs/cifs/inode.c: CIFS VFS: in cifs_revalidate_dentry as Xid: 8 with uid: 0 
> [...]
> Apr 24 23:15:49 p2400 kernel: [  922.708433] /home/christian/intel/linux-2.6.34-rc/fs/cifs/cifsfs.c: In cifs_put_super
> Apr 24 23:15:49 p2400 kernel: [  922.708437] /home/christian/intel/linux-2.6.34-rc/fs/cifs/connect.c: CIFS VFS: incifs_put_tcon as Xid: 10 with uid: 0 
> Apr 24 23:15:49 p2400 kernel: [  922.708440]  /home/christian/intel/linux-2.6.34-rc/fs/cifs/cifssmb.c: In tree disconnect 
> [...]

After some investigation, I found out that my share is umounted by ...
  dhcpcp
  --> /etc/sysconfig/network/scripts/dhcpcd-hook
    --> if-up br0 -o dhcp
      --> if-up.d/21-smbfs
        --> /usr/sbin/rcsmbfs restart
          --> umount -ta cifs

It seems that openSUSE didn't thought about the possibility, that somebody might mount cifs shares with other methods than their rcsmbfs script. But also in this case all shares would be umounted (and newly mounted after that) every time the dhcp lease is renewed. I 
think the rest of the problem (should if-up be called after a lease renewal, is it correct to call rcsmbfs from if-up, ...) is very specific to openSUSE. I'll submit a bug on their bug tracker the next days.

Thank you very much for your help.

Christian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ