Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   hannken
Date:           Thu Feb 27 16:51:39 UTC 2014

Modified Files:
        src/share/man/man9: vnodeops.9 vnsubr.9
        src/sys/coda: coda_vnops.c
        src/sys/fs/adosfs: adutil.c
        src/sys/fs/cd9660: cd9660_node.c
        src/sys/fs/efs: efs_ihash.c
        src/sys/fs/filecorefs: filecore_node.c
        src/sys/fs/hfs: hfs_nhash.c
        src/sys/fs/ptyfs: ptyfs_subr.c
        src/sys/fs/tmpfs: tmpfs_vnops.c
        src/sys/fs/union: union_vnops.c
        src/sys/kern: vfs_vnode.c vfs_vnops.c
        src/sys/miscfs/deadfs: dead_vnops.c
        src/sys/miscfs/fdesc: fdesc_vnops.c
        src/sys/miscfs/genfs: genfs.h genfs_vnops.c layer_extern.h
            layer_vnops.c
        src/sys/miscfs/kernfs: kernfs_subr.c
        src/sys/miscfs/nullfs: null_vnops.c
        src/sys/miscfs/overlay: overlay_vnops.c
        src/sys/miscfs/umapfs: umap_vnops.c
        src/sys/nfs: nfs_node.c
        src/sys/sys: param.h
        src/sys/ufs/chfs: chfs_ihash.c
        src/sys/ufs/lfs: ulfs_ihash.c
        src/sys/ufs/ufs: ufs_ihash.c

Log Message:
The current implementation of vn_lock() is racy.  Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
  the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/share/man/man9/vnodeops.9
cvs rdiff -u -r1.41 -r1.42 src/share/man/man9/vnsubr.9
cvs rdiff -u -r1.94 -r1.95 src/sys/coda/coda_vnops.c
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/adosfs/adutil.c
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/cd9660/cd9660_node.c
cvs rdiff -u -r1.9 -r1.10 src/sys/fs/efs/efs_ihash.c
cvs rdiff -u -r1.25 -r1.26 src/sys/fs/filecorefs/filecore_node.c
cvs rdiff -u -r1.12 -r1.13 src/sys/fs/hfs/hfs_nhash.c
cvs rdiff -u -r1.25 -r1.26 src/sys/fs/ptyfs/ptyfs_subr.c
cvs rdiff -u -r1.117 -r1.118 src/sys/fs/tmpfs/tmpfs_vnops.c
cvs rdiff -u -r1.56 -r1.57 src/sys/fs/union/union_vnops.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.188 -r1.189 src/sys/kern/vfs_vnops.c
cvs rdiff -u -r1.55 -r1.56 src/sys/miscfs/deadfs/dead_vnops.c
cvs rdiff -u -r1.117 -r1.118 src/sys/miscfs/fdesc/fdesc_vnops.c
cvs rdiff -u -r1.31 -r1.32 src/sys/miscfs/genfs/genfs.h
cvs rdiff -u -r1.189 -r1.190 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.34 -r1.35 src/sys/miscfs/genfs/layer_extern.h
cvs rdiff -u -r1.54 -r1.55 src/sys/miscfs/genfs/layer_vnops.c
cvs rdiff -u -r1.25 -r1.26 src/sys/miscfs/kernfs/kernfs_subr.c
cvs rdiff -u -r1.38 -r1.39 src/sys/miscfs/nullfs/null_vnops.c
cvs rdiff -u -r1.19 -r1.20 src/sys/miscfs/overlay/overlay_vnops.c
cvs rdiff -u -r1.55 -r1.56 src/sys/miscfs/umapfs/umap_vnops.c
cvs rdiff -u -r1.116 -r1.117 src/sys/nfs/nfs_node.c
cvs rdiff -u -r1.441 -r1.442 src/sys/sys/param.h
cvs rdiff -u -r1.2 -r1.3 src/sys/ufs/chfs/chfs_ihash.c
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/lfs/ulfs_ihash.c
cvs rdiff -u -r1.31 -r1.32 src/sys/ufs/ufs/ufs_ihash.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index