1. 03 Mar, 2010 4 commits
  2. 16 Jan, 2010 4 commits
  3. 17 Dec, 2009 1 commit
    • Linus Torvalds's avatar
      Revert "fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)" · a2770d86
      Linus Torvalds authored
      This reverts commit e9496ff4. Quoth Al:
      
       "it's dependent on a lot of other stuff not currently in mainline
        and badly broken with current fs/namespace.c.  Sorry, badly
        out-of-order cherry-pick from old queue.
      
        PS: there's a large pending series reworking the refcounting and
        lifetime rules for vfsmounts that will, among other things, allow to
        rip a subtree away _without_ dissolving connections in it, to be
        garbage-collected when all active references are gone.  It's
        considerably saner wrt "is the subtree busy" logics, but it's nowhere
        near being ready for merge at the moment; this changeset is one of the
        things becoming possible with that sucker, but it certainly shouldn't
        have been picked during this cycle.  My apologies..."
      Noticed-by: default avatarEric Paris <eparis@redhat.com>
      Requested-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a2770d86
  4. 16 Dec, 2009 1 commit
  5. 11 Oct, 2009 1 commit
  6. 24 Sep, 2009 1 commit
    • Vegard Nossum's avatar
      fs: fix overflow in sys_mount() for in-kernel calls · eca6f534
      Vegard Nossum authored
      sys_mount() reads/copies a whole page for its "type" parameter.  When
      do_mount_root() passes a kernel address that points to an object which is
      smaller than a whole page, copy_mount_options() will happily go past this
      memory object, possibly dereferencing "wild" pointers that could be in any
      state (hence the kmemcheck warning, which shows that parts of the next
      page are not even allocated).
      
      (The likelihood of something going wrong here is pretty low -- first of
      all this only applies to kernel calls to sys_mount(), which are mostly
      found in the boot code.  Secondly, I guess if the page was not mapped,
      exact_copy_from_user() _would_ in fact handle it correctly because of its
      access_ok(), etc.  checks.)
      
      But it is much nicer to avoid the dubious reads altogether, by stopping as
      soon as we find a NUL byte.  Is there a good reason why we can't do
      something like this, using the already existing strndup_from_user()?
      
      [akpm@linux-foundation.org: make copy_mount_string() static]
      [AV: fix compat mount breakage, which involves undoing akpm's change above]
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avataral <al@dizzy.pdmi.ras.ru>
      eca6f534
  7. 07 Aug, 2009 1 commit
  8. 08 Jul, 2009 1 commit
  9. 24 Jun, 2009 2 commits
  10. 23 Jun, 2009 2 commits
    • Trond Myklebust's avatar
      VFS: Add VFS helper functions for setting up private namespaces · cf8d2c11
      Trond Myklebust authored
      The purpose of this patch is to improve the remote mount path lookup
      support for distributed filesystems such as the NFSv4 client.
      
      When given a mount command of the form "mount server:/foo/bar /mnt", the
      NFSv4 client is required to look up the filehandle for "server:/", and
      then look up each component of the remote mount path "foo/bar" in order
      to find the directory that is actually going to be mounted on /mnt.
      Following that remote mount path may involve following symlinks,
      crossing server-side mount points and even following referrals to
      filesystem volumes on other servers.
      
      Since the standard VFS path lookup code already supports walking paths
      that contain all these features (using in-kernel automounts for
      following referrals) we would like to be able to reuse that rather than
      duplicate the full path traversal functionality in the NFSv4 client code.
      
      This patch therefore defines a VFS helper function create_mnt_ns(), that
      sets up a temporary filesystem namespace and attaches a root filesystem to
      it. It exports the create_mnt_ns() and put_mnt_ns() function for use by
      filesystem modules.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cf8d2c11
    • Trond Myklebust's avatar
      VFS: Uninline the function put_mnt_ns() · 616511d0
      Trond Myklebust authored
      In order to allow modules to use it without having to export vfsmount_lock.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      616511d0
  11. 12 Jun, 2009 10 commits
  12. 09 May, 2009 2 commits
  13. 21 Apr, 2009 1 commit
  14. 19 Apr, 2009 1 commit
  15. 01 Apr, 2009 3 commits
  16. 27 Mar, 2009 1 commit
  17. 26 Mar, 2009 2 commits
  18. 17 Feb, 2009 1 commit
    • Al Viro's avatar
      Fix incomplete __mntput locking · 1a88b536
      Al Viro authored
      Getting this wrong caused
      
      	WARNING: at fs/namespace.c:636 mntput_no_expire+0xac/0xf2()
      
      due to optimistically checking cpu_writer->mnt outside the spinlock.
      
      Here's what we really want:
       * we know that nobody will set cpu_writer->mnt to mnt from now on
       * all changes to that sucker are done under cpu_writer->lock
       * we want the laziest equivalent of
      	spin_lock(&cpu_writer->lock);
      	if (likely(cpu_writer->mnt != mnt)) {
      		spin_unlock(&cpu_writer->lock);
      		continue;
      	}
      	/* do stuff */
        that would make sure we won't miss earlier setting of ->mnt done by
        another CPU.
      
      Anyway, for now we just move the spin_lock() earlier and move the test
      into the properly locked region.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Reported-and-tested-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1a88b536
  19. 14 Jan, 2009 1 commit