Revision tags: release/9.0.0 |
|
#
e517e6f1 |
| 09-Dec-2011 |
John Baldwin <jhb@FreeBSD.org> |
Explicitly use curthread while manipulating td_fpop during last close of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collect
Explicitly use curthread while manipulating td_fpop during last close of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collection of open file descriptors in pending control messages in the socket buffer of a UNIX domain socket after it was closed.
PR: kern/151758 Submitted by: Andrey Shidakov andrey shidakov ru Submitted by: Ruben van Staveren ruben verweg com Reviewed by: kib MFC after: 2 weeks
show more ...
|
#
3ee1a36e |
| 22-Nov-2011 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r227804
Pull in the virtio drivers from head.
|
#
f82360ac |
| 19-Nov-2011 |
Konstantin Belousov <kib@FreeBSD.org> |
Existing VOP_VPTOCNP() interface has a fatal flow that is critical for nullfs. The problem is that resulting vnode is only required to be held on return from the successfull call to vop, instead of
Existing VOP_VPTOCNP() interface has a fatal flow that is critical for nullfs. The problem is that resulting vnode is only required to be held on return from the successfull call to vop, instead of being referenced.
Nullfs VOP_INACTIVE() method reclaims the vnode, which in combination with the VOP_VPTOCNP() interface means that the directory vnode returned from VOP_VPTOCNP() is reclaimed in advance, causing vn_fullpath() to error with EBADF or like.
Change the interface for VOP_VPTOCNP(), now the dvp must be referenced. Convert all in-tree implementations of VOP_VPTOCNP(), which is trivial, because vhold(9) and vref(9) are similar in the locking prerequisites. Out-of-tree fs implementation of VOP_VPTOCNP(), if any, should have no trouble with the fix.
Tested by: pho Reviewed by: mckusick MFC after: 3 weeks (subject of re approval)
show more ...
|
#
dccc45e4 |
| 04-Nov-2011 |
John Baldwin <jhb@FreeBSD.org> |
Move the cleanup of f_cdevpriv when the reference count of a devfs file descriptor drops to zero out of _fdrop() and into devfs_close_f() as it is only relevant for devfs file descriptors.
Reviewed
Move the cleanup of f_cdevpriv when the reference count of a devfs file descriptor drops to zero out of _fdrop() and into devfs_close_f() as it is only relevant for devfs file descriptors.
Reviewed by: kib MFC after: 1 week
show more ...
|
#
1fef78c3 |
| 03-Nov-2011 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix kernel panic when d_fdopen csw method is called for NULL fp. This may happen when kernel consumer calls VOP_OPEN().
Reported by: Tavis Ormandy <taviso cmpxchg8b com> through delphij MFC after:
Fix kernel panic when d_fdopen csw method is called for NULL fp. This may happen when kernel consumer calls VOP_OPEN().
Reported by: Tavis Ormandy <taviso cmpxchg8b com> through delphij MFC after: 3 days
show more ...
|
#
fab4c373 |
| 16-Sep-2011 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r225592
sys/dev/bvm/bvm_console.c - move up to the new alt-break order.
|
#
4ff9eb89 |
| 01-Sep-2011 |
Alexander Motin <mav@FreeBSD.org> |
Integrate from head at r225316.
|
#
9c00bb91 |
| 16-Aug-2011 |
Konstantin Belousov <kib@FreeBSD.org> |
Add the fo_chown and fo_chmod methods to struct fileops and use them to implement fchown(2) and fchmod(2) support for several file types that previously lacked it. Add MAC entries for chown/chmod don
Add the fo_chown and fo_chmod methods to struct fileops and use them to implement fchown(2) and fchmod(2) support for several file types that previously lacked it. Add MAC entries for chown/chmod done on posix shared memory and (old) in-kernel posix semaphores.
Based on the submission by: glebius Reviewed by: rwatson Approved by: re (bz)
show more ...
|
#
7cc13fcf |
| 16-Aug-2011 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Correct the rendering of device aliases that reside in subdirectories of a devfs.
devfs/devfs_vnops.c: In devfs_readlink(), convert the devfs root relative path of an alias's parent, that is recor
Correct the rendering of device aliases that reside in subdirectories of a devfs.
devfs/devfs_vnops.c: In devfs_readlink(), convert the devfs root relative path of an alias's parent, that is recorded in the alias, into a fully qualified path that includes the root of the containing devfs. This avoids the ugliness of generating a relative path by prepending "../"'s. For a non-jailed process, the "symlink root" is the devfs's mount point. For a jailed process, we must remove any jail prefix in the mount point so that our response matches the user process's world view.
Sponsored by: Spectra Logic Corporation
show more ...
|
#
bd2228ab |
| 19-Jul-2011 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r224187
|
#
935205e2 |
| 17-Jul-2011 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Integrate from Head into ZFSD feature branch as of revision r224141.
|
#
724ce55b |
| 13-Jul-2011 |
Konstantin Belousov <kib@FreeBSD.org> |
While fixing the looping of a thread while devfs vnode is reclaimed, r179247 introduced a possibility of devfs_allocv() returning spurious ENOENT. If the vnode is selected by vnlru daemon for reclama
While fixing the looping of a thread while devfs vnode is reclaimed, r179247 introduced a possibility of devfs_allocv() returning spurious ENOENT. If the vnode is selected by vnlru daemon for reclamation, then devfs_allocv() can get ENOENT from vget() due to devfs_close() dropping vnode lock around the call to cdevsw d_close method.
Use LK_RETRY in the vget() call, and do some part of the devfs_reclaim() work in devfs_allocv(), clearing vp->v_data and de->de_vnode. Retry the allocation of the vnode, now with de->de_vnode == NULL.
The check vp->v_data == NULL at the start of devfs_close() cannot be affected by the change, since vnode lock must be held while VI_DOOMED is set, and only dropped after the check.
Reported and tested by: Kohji Okuno <okuno.kohji jp panasonic com> Reviewed by: attilio MFC after: 3 weeks
show more ...
|
#
9b4fcf85 |
| 18-Feb-2011 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@218816
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
#
2d843e7d |
| 15-Dec-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Don't allow user created symbolic links to cover another entries marked with DE_USER. If a devfs rule hid such entry, it was possible to create infinite number of symbolic links with the same name.
Don't allow user created symbolic links to cover another entries marked with DE_USER. If a devfs rule hid such entry, it was possible to create infinite number of symbolic links with the same name.
Reviewed by: kib
show more ...
|
#
ef456eec |
| 15-Dec-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
- Assert that dm_lock is exclusively held in devfs_rules_apply() and in devfs_vmkdir() while adding the entry to de_list of the parent. - Apply devfs rules to newly created directories and symbolic
- Assert that dm_lock is exclusively held in devfs_rules_apply() and in devfs_vmkdir() while adding the entry to de_list of the parent. - Apply devfs rules to newly created directories and symbolic links.
PR: kern/125034 Submitted by: Mateusz Guzik (original version)
show more ...
|
#
6f3544cd |
| 26-Oct-2010 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@214309
|
#
d318c565 |
| 27-Sep-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Add reference counting for devfs paths containing user created symbolic links. The reference counting is needed to be able to determine if a specific devfs path exists. For true device file paths we
Add reference counting for devfs paths containing user created symbolic links. The reference counting is needed to be able to determine if a specific devfs path exists. For true device file paths we can traverse the cdevp_list but a separate directory list is needed for user created symbolic links.
Add a new directory entry flag DE_USER to mark entries which should unreference their parent directory on deletion.
A new function to traverse cdevp_list and the directory list will be introduced in a separate commit.
Idea from: kib Reviewed by: kib
show more ...
|
#
6adc5230 |
| 21-Sep-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Modify devfs_fqpn() for future use in devfs path reference counting code:
- Accept devfs_mount and devfs_dirent as the arguments instead of a vnode. This generalizes the function so that it can be
Modify devfs_fqpn() for future use in devfs path reference counting code:
- Accept devfs_mount and devfs_dirent as the arguments instead of a vnode. This generalizes the function so that it can be used from contexts where vnode references are not available. - Accept NULL cnp argument. No '/' will be appended, if a NULL cnp is provided. - Make the function global and add its prototype to devfs.h.
Reviewed by: kib
show more ...
|
#
89d10571 |
| 15-Sep-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Remove empty devfs directories automatically.
devfs_delete() now recursively removes empty parent directories unless the DEVFS_DEL_NORECURSE flag is specified. devfs_delete() can't be called anymore
Remove empty devfs directories automatically.
devfs_delete() now recursively removes empty parent directories unless the DEVFS_DEL_NORECURSE flag is specified. devfs_delete() can't be called anymore with a parent directory vnode lock held because the possible parent directory deletion needs to lock the vnode. Thus we unlock the parent directory vnode in devfs_remove() before calling devfs_delete().
Call devfs_populate_vp() from devfs_symlink() and devfs_vptocnp() as now directories can get removed.
Add a check for DE_DOOMED flag to devfs_populate_vp() because devfs_delete() drops dm_lock before the VI_DOOMED vnode flag gets set. This ensures that devfs_populate_vp() returns an error for directories which are in progress of deletion.
Reviewed by: kib Discussed on: freebsd-current (mostly silence)
show more ...
|
#
4136388a |
| 26-Aug-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Set de_dir for user created symbolic links. This will be needed to be able to resolve their parent directories.
|
#
f5efcd64 |
| 25-Aug-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Call devfs_populate_vp() from devfs_getattr(). It was possible that fstat(2) returned stale information through an open file descriptor.
|
#
0f6bb099 |
| 22-Aug-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Introduce and use devfs_populate_vp() to unlock a vnode before calling devfs_populate(). This is a prerequisite for the automatic removal of empty directories which will be committed in the future.
Introduce and use devfs_populate_vp() to unlock a vnode before calling devfs_populate(). This is a prerequisite for the automatic removal of empty directories which will be committed in the future.
Reviewed by: kib (previous version)
show more ...
|
#
3634d5b2 |
| 20-Aug-2010 |
John Baldwin <jhb@FreeBSD.org> |
Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that
Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that the associated lockmgr lock is exclusively locked by the current thread when manipulating these flags to ensure the flag updates are safe. This last change required some minor shuffling in a few filesystems to exclusively lock a brand new vnode slightly earlier.
Reviewed by: kib MFC after: 3 days
show more ...
|
#
96835d61 |
| 19-Aug-2010 |
Jaakko Heinonen <jh@FreeBSD.org> |
Call dev_rel() in error paths.
Reported by: kib Reviewed by: kib MFC after: 2 weeks
|
#
b17f9ad2 |
| 16-Aug-2010 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Merge svn+ssh://svn.freebsd.org/base/head@211344
|