22 May, 2010

1 commit


15 May, 2010

1 commit

  • 1) i_flags simply doesn't work for mount/unlink race prevention;
    we may have many links to file and rm on one of those obviously
    shouldn't prevent bind on top of another later on. To fix it
    right way we need to mark _dentry_ as unsuitable for mounting
    upon; new flag (DCACHE_CANT_MOUNT) is protected by d_flags and
    i_mutex on the inode in question. Set it (with dont_mount(dentry))
    in unlink/rmdir/etc., check (with cant_mount(dentry)) in places
    in namespace.c that used to check for S_DEAD. Setting S_DEAD
    is still needed in places where we used to set it (for directories
    getting killed), since we rely on it for readdir/rmdir race
    prevention.

    2) rename()/mount() protection has another bogosity - we unhash
    the target before we'd checked that it's not a mountpoint. Fixed.

    3) ancient bogosity in pivot_root() - we locked i_mutex on the
    right directory, but checked S_DEAD on the different (and wrong)
    one. Noticed and fixed.

    Signed-off-by: Al Viro

    Al Viro
     

13 May, 2010

1 commit

  • According to specification

    mkdir d; ln -s d a; open("a/", O_NOFOLLOW | O_RDONLY)

    should return success but currently it returns ELOOP. This is a
    regression caused by path lookup cleanup patch series.

    Fix the code to ignore O_NOFOLLOW in case the provided path has trailing
    slashes.

    Cc: Andrew Morton
    Cc: Al Viro
    Reported-by: Marius Tolzmann
    Acked-by: Miklos Szeredi
    Signed-off-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Jan Kara
     

27 Mar, 2010

1 commit


08 Mar, 2010

1 commit


07 Mar, 2010

1 commit


06 Mar, 2010

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
    quota: stop using QUOTA_OK / NO_QUOTA
    dquot: cleanup dquot initialize routine
    dquot: move dquot initialization responsibility into the filesystem
    dquot: cleanup dquot drop routine
    dquot: move dquot drop responsibility into the filesystem
    dquot: cleanup dquot transfer routine
    dquot: move dquot transfer responsibility into the filesystem
    dquot: cleanup inode allocation / freeing routines
    dquot: cleanup space allocation / freeing routines
    ext3: add writepage sanity checks
    ext3: Truncate allocated blocks if direct IO write fails to update i_size
    quota: Properly invalidate caches even for filesystems with blocksize < pagesize
    quota: generalize quota transfer interface
    quota: sb_quota state flags cleanup
    jbd: Delay discarding buffers in journal_unmap_buffer
    ext3: quota_write cross block boundary behaviour
    quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
    quota: split out compat_sys_quotactl support from quota.c
    quota: split out netlink notification support from quota.c
    quota: remove invalid optimization from quota_sync_all
    ...

    Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c

    Linus Torvalds
     

05 Mar, 2010

19 commits


04 Mar, 2010

4 commits


19 Feb, 2010

1 commit


09 Feb, 2010

2 commits


07 Feb, 2010

2 commits

  • ima_path_check actually deals with files! call it ima_file_check instead.

    Signed-off-by: Eric Paris
    Acked-by: Mimi Zohar
    Signed-off-by: Al Viro

    Mimi Zohar
     
  • The "Untangling ima mess, part 2 with counters" patch messed
    up the counters. Based on conversations with Al Viro, this patch
    streamlines ima_path_check() by removing the counter maintaince.
    The counters are now updated independently, from measuring the file,
    in __dentry_open() and alloc_file() by calling ima_counts_get().
    ima_path_check() is called from nfsd and do_filp_open().
    It also did not measure all files that should have been measured.
    Reason: ima_path_check() got bogus value passed as mask.
    [AV: mea culpa]
    [AV: add missing nfsd bits]

    Signed-off-by: Mimi Zohar
    Signed-off-by: Al Viro

    Mimi Zohar
     

04 Feb, 2010

1 commit


14 Jan, 2010

3 commits

  • Instead of playing sick games with path saving, cleanups, just retry
    the entire thing once with LOOKUP_REVAL added. Post-.34 we'll convert
    all -ESTALE handling in there to that style, rather than playing with
    many retry loops deep in the call chain.

    Signed-off-by: Al Viro

    Al Viro
     
  • commit 5300990c0370e804e49d9a59d928c5d53fb73487 had stepped on a rather
    nasty mess: definitions of ACC_MODE used to be different. Fixed the
    resulting breakage, converting them to variant that takes O_... value;
    all callers have that and it actually simplifies life (see tomoyo part
    of changes).

    Signed-off-by: Al Viro

    Al Viro
     
  • We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
    if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
    is bogus here; we want LAST_BIND for everything of that kind and we
    get LAST_NORM left over from finding parent directory.

    So make sure that it *is* set properly; set to LAST_BIND before
    doing ->follow_link() - for normal symlinks it will be changed
    by __vfs_follow_link() and everything else needs it set that way.

    Signed-off-by: Al Viro

    Al Viro
     

31 Dec, 2009

1 commit

  • generic_permission was refusing CAP_DAC_READ_SEARCH-enabled
    processes from opening DAC-protected files read-only, because
    do_filp_open adds MAY_OPEN to the open mask.

    Ignore MAY_OPEN. After this patch, CAP_DAC_READ_SEARCH is
    again sufficient to open(fname, O_RDONLY) on a file to which
    DAC otherwise refuses us read permission.

    Reported-by: Mike Kazantsev
    Signed-off-by: Serge E. Hallyn
    Tested-by: Mike Kazantsev
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn