1. 01 4月, 2009 4 次提交
    • A
      New locking/refcounting for fs_struct · 498052bb
      Al Viro 提交于
      * all changes of current->fs are done under task_lock and write_lock of
        old fs->lock
      * refcount is not atomic anymore (same protection)
      * its decrements are done when removing reference from current; at the
        same time we decide whether to free it.
      * put_fs_struct() is gone
      * new field - ->in_exec.  Set by check_unsafe_exec() if we are trying to do
        execve() and only subthreads share fs_struct.  Cleared when finishing exec
        (success and failure alike).  Makes CLONE_FS fail with -EAGAIN if set.
      * check_unsafe_exec() may fail with -EAGAIN if another execve() from subthread
        is in progress.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      498052bb
    • A
      Take fs_struct handling to new file (fs/fs_struct.c) · 3e93cd67
      Al Viro 提交于
      Pure code move; two new helper functions for nfsd and daemonize
      (unshare_fs_struct() and daemonize_fs_struct() resp.; for now -
      the same code as used to be in callers).  unshare_fs_struct()
      exported (for nfsd, as copy_fs_struct()/exit_fs() used to be),
      copy_fs_struct() and exit_fs() don't need exports anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3e93cd67
    • A
      Get rid of bumping fs_struct refcount in pivot_root(2) · f8ef3ed2
      Al Viro 提交于
      Not because execve races with _that_ are serious - we really
      need a situation when final drop of fs_struct refcount is
      done by something that used to have it as current->fs.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f8ef3ed2
    • A
      Kill unsharing fs_struct in __set_personality() · 11d06b2a
      Al Viro 提交于
      That's a rudiment of altroot support.  I.e. it should've been buried
      a long time ago.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      11d06b2a
  2. 31 3月, 2009 36 次提交