| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reviewed by: dg, bmilekic
MFC after: 3 days
|
|
|
|
|
|
|
| |
that it interacts properly with snapshotting.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
|
|
|
|
|
| |
to kern_acl.c when he added snapshotting. This will need to be added
at some point.
|
|
|
|
|
|
|
|
|
|
|
| |
call VOP_INACTIVE before placing the vnode back on the free list.
Otherwise there is a race condition on SMP machines between
getnewvnode() locking the vnode to reclaim it and vrele()
locking the vnode to inactivate it. This window of vulnerability
becomes exaggerated in the presence of filesystems that have
been suspended as the inactive routine may need to temporarily
release the lock on the vnode to avoid deadlock with the syncer
process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads race for a file slot.
dup2(2) incorrectly assumes that if it needs to grow the ofiles
array that it will get what it wants. This assertion was valid
before we allowed shared filedescriptor tables but is now incorrect.
The assertion can trigger superfolous panics if the thread doing a
dup2 looses a race with another thread while possibly blocked in
the MALLOC call in fdalloc. Another thread may grab the slot we
are requesting which makes fdalloc return something other than what
we asked for, this will triggering the bogus assertion.
MFC after: 2 weeks
Reviewed by: phk
|
|
|
|
|
|
| |
by unlocking the filedesc before calling FREE().
Submitted by: bde
|
|
|
|
| |
Noticed by: Michael Nottebrock <michaelnottebrock@gmx.net>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
signal trampoline for old signals. The arches that support old signals
currently abuse sigreturn(2) instead. This mainly complicates things
and slightly breaks the the new sigreturn(2).
COMPAT is too limited to support the correct configuration of osigreturn,
and this commit doesn't attempt to fix it; it just moves the bogusness:
osigreturn() must now be provided unconditionally even on arches that
don't really need it; previously it had to be provided under the bogus
condition defined(COMPAT_43).
|
|
|
|
|
|
| |
cache lockups for over a year now.
MFC after: 0 days
|
|
|
|
| |
Pointed out by: bde
|
| |
|
| |
|
|
|
|
| |
and \F. Awk just started warning about these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
other threads as well as speed up the interfaces.
To fix the race and accomplish the speedup, remove selholddrop and
pollholddrop. The entire concept is somewhat bogus because holding
the individual struct file pointers offers us no guarantees that
another thread context won't close it on us thereby removing our
access to our own reference.
Selholddrop and pollholddrop also would do multiple locks and unlocks
of mutexes _per-file_ in the fd arrays to be scanned, this needed to
be sped up.
Instead of using selholddrop and pollholddrop, simply hold the
filedesc lock over the selscan and pollscan functions. This should
protect us against close(2)'s on the files as reduce the multiple
lock/unlock pairs per fd into a single lock over the filedesc.
|
|
|
|
|
|
|
| |
negative, the 'pointer' referred to by the manpage is actually the
struct file's f_offset field.
Pointed out by: bde
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
from 1 megabyte of ram per user to 2 megabytes of ram per user, and
reduce the cap from 512 to 384. 512 leaves around 240 MB of KVM available
while 384 leaves 270 MB of KVM available. Available KVM is important
in order to deal with zalloc and kernel malloc area growth.
Reviewed by: mckusick
MFC: either before 4.5 if re's agree, or after 4.5
|
|
|
|
|
|
| |
because of a signed/unsigned problem.
Approved by: DES
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
headers or trailers are supplied. Reported by Vladislav Shabanov
<vs@rambler-co.ru>.
PR: 33771
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
MFC after: 3 days
|
|
|
|
|
|
| |
make extendable sbufs as overflowed.
Approved by: des
|
|
|
|
|
|
|
| |
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.
MFC after: 2 weeks
|
|
|
|
| |
fix indentation of FILE_LOCK/UNLOCK macros while I'm here.
|
|
|
|
|
|
|
| |
replace mutex_lock calls on uidinfo with macro calls:
mtx_lock(&uidp->ui_mtx) -> UIDINFO_LOCK(uidp)
Terry Lambert <tlambert2@mindspring.com> helped with this.
|
|
|
|
|
| |
the per-thread jobtorun queue.
o Use TAILQ_EMPTY() instead of TAILQ_FIRST(...) == NULL.
|
|
|
|
|
|
|
|
|
| |
sleeping on a process object but changed the corresponding
wakeup()s to the thread object. The result was that non-raw
aio ops waited for an aio daemon to timeout before action
was taken. Now, we sleep on the thread object.
PR: kern/34016
|
|
|
|
|
|
|
|
|
|
|
|
| |
operation. The vgonel() code has always called vclean() but until we
started proactively freeing vnodes it would never actually be called with
a dirty vnode, so this situation did not occur prior to the vnlru() code.
Now that we proactively free vnodes when kern.maxvnodes is hit, however,
vclean() winds up with work to do and improperly generates the warnings.
Reviewed by: peter
Approved by: re (for MFC)
MFC after: 1 day
|
|
|
|
|
|
| |
fdrop isn't SMP safe as it may call into the file's close routine which
definetly is not SMP safe right now, so we hold Giant over calls to
fdrop now.
|
|
|
|
| |
rebooting.
|
|
|
|
|
|
| |
thread other than the curthread holds an sx.
While I am here, break a line at the end of warning.
|
|
|
|
| |
of them need to become even larger to support devfs.
|
|
|
|
|
| |
This removes the only atomic operation on a char type in the entire
kernel.
|
| |
|
|
|
|
| |
the syscall.
|
|
|
|
|
|
| |
beneath it.
Reviewed by: rwatson
|
|
|
|
|
|
|
| |
seem to be too short for the 500 Mhz DS20 I'm testing on. The rather
arbitrary numbers are rather bogus anyways. We should probably have
variables for these limits that are calibrated in the MD startup code
somehow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
involving file removal or file update were not always being fully
committed to disk. The result was lost files or corrupted file data.
This change ensures that the filesystem is properly synced to disk
before the filesystem is down-graded.
This delta also fixes a long standing bug in which a file open for
reading has been unlinked. When the last open reference to the file
is closed, the inode is reclaimed by the filesystem. Previously,
if the filesystem had been down-graded to read-only, the inode could
not be reclaimed, and thus was lost and had to be later recovered
by fsck. With this change, such files are found at the time of the
down-grade. Normally they will result in the filesystem down-grade
failing with `device busy'. If a forcible down-grade is done, then
the affected files will be revoked causing the inode to be released
and the open file descriptors to begin failing on attempts to read.
Submitted by: "Sam Leffler" <sam@errno.com>
|
|
|
|
|
| |
calling closef() in the case of dup2(2) duping over a descriptor
and when fdalloc must grow or free a filedesc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backout revision 1.56 and 1.57 of fifo_vnops.c.
Introduce a new poll op "POLLINIGNEOF" that can be used to ignore
EOF on a fifo, POLLIN/POLLRDNORM is converted to POLLINIGNEOF within
the FIFO implementation to effect the correct behavior.
This should allow one to view a fifo pretty much as a data source
rather than worry about connections coming and going.
Reviewed by: bde
|
|
|
|
| |
Submitted by: tanimura
|
|
|
|
|
|
|
|
|
| |
than necessary.
o Move a rarely-used goto label inside a critical section so that we don't
perform an splnet() for which there is no corresponding splx().
o Remove unnecessary splnet()/splx() around accesses to kaioinfo::kaio_jobdone
in aio_return().
o Use TAILQ_FOREACH for simple cases of iteration over kaioinfo::kaio_jobdone.
|
|
|
|
|
|
|
|
| |
Make fget MPsafe.
Make fgetvp and fgetsock use the fget subsystem to reduce code bloat.
Push giant down in fpathconf().
|
|
|
|
| |
Requested by: jhb
|
|
|
|
|
|
|
| |
instead of execve(). Otherwise, the possibility still exists
for a pending AIO to modify the new address space.
Reviewed by: alfred
|
| |
|
|
|
|
| |
Recommended by: jhb
|