All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	Roderich.Schupp.extern@mch.siemens.de,
	linux-kernel@vger.kernel.org,
	linux-hotplug-devel@lists.sourceforge.net,
	Greg KH <greg@kroah.com>
Subject: Re: Race between "mount" uevent and /proc/mounts?
Date: Thu, 03 Nov 2005 11:30:23 +0000	[thread overview]
Message-ID: <20051103113023.GE7992@ftp.linux.org.uk> (raw)
In-Reply-To: <20051103105235.GB23142@master.mivlgu.local>

On Thu, Nov 03, 2005 at 01:52:35PM +0300, Sergey Vlasov wrote:
> > Ugh...  So umount -l gives one hell of a spew for no good reason.
> 
> umount -l will change contents of /proc/mounts, so waking up poll() on
> that file seems to be right in this case (even if the filesystem is still
> mounted internally, it is no longer accessible).

Yes, but that's a single change.
 
> > Bad idea - copy_tree() will spew *and* we get bogus events on CLONE_NEWNS
> > (i.e. current->namespace is not even the namespace being modified).
> 
> IMHO it's not spew, but real changes in the mount tree.

Again, mount --rbind is a single change.  And fsckloads of attach_mnt().
IOW, you are doing that on too low level.  Right ones:

	* graft_tree()
	* do_move_mount()
	* sys_pivot_root()
	* expire_mount() (BTW, again wrong namespace touched in your variant)
	* lazy one in umount_tree() (single update of event in do_umount(),
then touch ->mnt_namespace for each vfsmount - with shared-subtree it may
affect more than one namespace)
	* couple of extra places introduced by shared-subtree patchset


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@ftp.linux.org.uk>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	Roderich.Schupp.extern@mch.siemens.de,
	linux-kernel@vger.kernel.org,
	linux-hotplug-devel@lists.sourceforge.net,
	Greg KH <greg@kroah.com>
Subject: Re: Race between "mount" uevent and /proc/mounts?
Date: Thu, 3 Nov 2005 11:30:23 +0000	[thread overview]
Message-ID: <20051103113023.GE7992@ftp.linux.org.uk> (raw)
In-Reply-To: <20051103105235.GB23142@master.mivlgu.local>

On Thu, Nov 03, 2005 at 01:52:35PM +0300, Sergey Vlasov wrote:
> > Ugh...  So umount -l gives one hell of a spew for no good reason.
> 
> umount -l will change contents of /proc/mounts, so waking up poll() on
> that file seems to be right in this case (even if the filesystem is still
> mounted internally, it is no longer accessible).

Yes, but that's a single change.
 
> > Bad idea - copy_tree() will spew *and* we get bogus events on CLONE_NEWNS
> > (i.e. current->namespace is not even the namespace being modified).
> 
> IMHO it's not spew, but real changes in the mount tree.

Again, mount --rbind is a single change.  And fsckloads of attach_mnt().
IOW, you are doing that on too low level.  Right ones:

	* graft_tree()
	* do_move_mount()
	* sys_pivot_root()
	* expire_mount() (BTW, again wrong namespace touched in your variant)
	* lazy one in umount_tree() (single update of event in do_umount(),
then touch ->mnt_namespace for each vfsmount - with shared-subtree it may
affect more than one namespace)
	* couple of extra places introduced by shared-subtree patchset

  reply	other threads:[~2005-11-03 11:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 13:20 Race between "mount" uevent and /proc/mounts? Schupp Roderich (extern) BenQ MD PD SWP 2 CM MCH
2005-10-25 14:00 ` Al Viro
2005-10-26 10:27   ` Sergey Vlasov
2005-10-26 10:27     ` Sergey Vlasov
2005-10-26 11:15     ` Al Viro
2005-10-26 11:15       ` Al Viro
2005-10-26 14:34       ` Kay Sievers
2005-10-26 14:34         ` Kay Sievers
2005-10-26 14:45         ` Xavier Bestel
2005-10-26 14:45           ` Xavier Bestel
2005-10-26 19:28         ` Al Viro
2005-10-26 19:28           ` Al Viro
2005-11-01  0:28           ` Kay Sievers
2005-11-01  0:28             ` Kay Sievers
2005-11-01  3:58             ` Kay Sievers
2005-11-01  3:58               ` Kay Sievers
2005-11-01 19:54               ` Sergey Vlasov
2005-11-01 19:54                 ` Sergey Vlasov
2005-11-01 21:35                 ` Kay Sievers
2005-11-01 21:35                   ` Kay Sievers
2005-11-02 13:01                   ` Sergey Vlasov
2005-11-02 13:01                     ` Sergey Vlasov
2005-11-03  8:07                     ` Al Viro
2005-11-03  8:07                       ` Al Viro
2005-11-03 10:52                       ` Sergey Vlasov
2005-11-03 10:52                         ` Sergey Vlasov
2005-11-03 11:30                         ` Al Viro [this message]
2005-11-03 11:30                           ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051103113023.GE7992@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=Roderich.Schupp.extern@mch.siemens.de \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vsu@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.