| Age | Commit message (Collapse) | Author |
|
* 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: Al Viro <viro@zeniv.linux.org.uk>
|
|
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: Al Viro <viro@zeniv.linux.org.uk>
|
|
Annotate struct fs_struct's usage count to indicate the restrictions upon it.
It may not be incremented, except by clone(CLONE_FS), as this affects the
check in check_unsafe_exec() in fs/exec.c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
long overdue...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
In nearly all cases the set_fs_{root,pwd}() calls work on a struct
path. Change the function to reflect this and use path_get() here.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
* Use struct path in fs_struct.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
fs_cachep is only used in kernel/exit.c and in kernel/fork.c.
It is used to store fs_struct items so it should be placed in linux/fs_struct.h
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
It's only need for the two monster-inlines set_fs_root and set_fs_pwd
that should better be out of line anyway. Some additional cleanup like
named initializers as extra bonus.
|
|
OK, here comes. Patch below is an attempt to do the fastwalk
stuff in right way and so far it seems to be working.
- dentry leak is plugged
- locked/unlocked state of nameidata doesn't depend on history - it
depends only on point in code.
- LOOKUP_LOCKED is gone.
- following mounts and .. doesn't drop dcache_lock
- light-weight permission check distinguishes between "don't know" and
"permission denied", so we don't call full-blown permission() unless
we have to.
- code that changes root/pwd holds dcache_lock _and_ write lock on
current->fs->lock. I.e. if we hold dcache_lock we can safely
access our ->fs->{root,pwd}{,mnt}
- __d_lookup() does not increment refcount; callers do dget_locked()
if they need it (behaviour of d_lookup() didn't change, obviously).
- link_path_walk() logics had been (somewhat) cleaned up.
|
|
Big bits first, I'll redo the smaller bits tomorrow after some sleep.
Same as last time, rediffed against pre5
|
|
- Andreas Dilger: various ext2 cleanups
- Richard Gooch: devfs update
- Johannes Erdfelt: USB updates
- Alan Cox: merges
- David Miller: fix SMP pktsched bootup deadlock (CONFIG_NET_SCHED)
- Roman Zippel: AFFS update
- Anton Altaparmakov: NTFS update
- me: fix races in vfork() (semaphores are not good completion handlers)
- Jeff Garzik: net driver updates, sysvfs update
|
|
- Rik van Riel and others: mm rw-semaphore (ps/top ok when swapping)
- IDE: 256 sectors at a time is legal, but apparently confuses some
drives. Max out at 255 sectors instead.
- Petko Manolov: USB pegasus driver update
- make the boottime memory map printout at least almost readable.
- USB driver updates
- pte_alloc()/pmd_alloc() need page_table_lock.
|
|
|