Age | Commit message (Collapse) | Author |
|
the protection of the memory mapping we're doing I/O on, or if we want to
leave them as they are. This should only be necessary for breakpoint
insertion in code, so we'll only use it for ptrace requests.
Initially from art@ after discussion with kettenis@ millert@ and I,
tested by many.
|
|
one case fixed here).
miod@ "appears to be harmless"
markus@ ok
|
|
|
|
|
|
everyone for the prompt review and ok of this work ;-) Yeah, that includes me
too, or maybe especially me. I am sorry.
Change the sched_lock to a mutex. This fixes, among other things, the infamous
"telnet localhost &" problem. The real bug in that case was that the sched_lock
which is by design a non-recursive lock, was recursively acquired, and not
enough releases made us hold the lock in the idle loop, blocking scheduling
on the other processors. Some of the other processors would hold the biglock though,
which made it impossible for cpu 0 to enter the kernel... A nice deadlock.
Let me just say debugging this for days just to realize that it was all fixed
in an old diff noone ever ok'd was somewhat of an anti-climax.
This diff also changes splsched to be correct for all our architectures.
|
|
double-lock the vnode if we're coming from vclean()
|
|
|
|
ok deraadt@, miod@
|
|
enough to allow us to call vgone() from procfs_inactive(). to avoid a
deadlock, check for VXLOCK as well, in case we were called from
vclean(). problem report from Sho Fujita, okay tedu@.
|
|
which is not possible here. Problem found and fixed by form@.
ok millert@ fgsch@ pedro@
|
|
|
|
|
|
in generated object file. from Joris Vink.
|
|
Problem found by Christer Oberg. OK henning@, deraadt@
|
|
|
|
flushing loop, otherwise we could hard-lock the machine when unmounting
an union filesystem
ok tedu@
|
|
|
|
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
|
|
|
|
using CMSG_ALIGN was wrong, userland fires in data not so aligned.
if fd_getfile returns NULL, don't try to close the fd, since it's not there.
|
|
|
|
hackers@ ok
|
|
|
|
|
|
and m68k.
ok drahn@, millert@
|
|
|
|
|
|
O_NONBLOCK set and there are no readers. Before returning ENXIO
fifo_open calls VOP_CLOSE (and hence fifo_close). However, since
fi_writers has not yet been incremented, when fifo_close decements
fi_writers it is one too few. This could cause qmail processes
to spin, consuming all the CPU.
Noticed by avsm@ and henning@, test case provided by claudio@, Ok pedro@
|
|
|
|
ok deraadt@ millert@
problem noticed by deprotect.com
|
|
|
|
|
|
from pedro martelletto
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function.
also check fifoinfo is valid before deref.
ok millert@
|
|
o use different wchan string for reading and writing
o make O_RDWR not block forever
o remove some useless casts
o reorganize the normal, blocking code path (ie: O_NONBLOCK not set)
o fix select/poll semantics wrt EOF.
With these changes we pass the FIFO regress. OK tedu@
|
|
by marc balmer
|
|
in fifo_close(). If the FIFO is accessed via a layed fs (e.g. nullfs),
v_usecount will always be 1. Instead, just check fip->if_readers and
fip->fi_writers. If either one is non-zero we know the FIFO is in use
and we should not free up its resources. Adapted from FreeBSD, NetBSD
has an equivalent change (but they keep a counter instead).
|
|
|
|
|
|
don't bother with microtime. time should be more than enough precision.
from netbsd.
|
|
|
|
|
|
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
|
|
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@
|