do not emit the thread or proc information making debugging this
assertion difficult.
Emit the thread/proc that caused the KASSERT to fail to ease debugging.
Note: this assert does not exist in later branches of FreeBSD.
Turn's out Kris' suspisions were right - from a suttle code compatability
point of view. Robert Watson found that ARLA code had something like this:
typedef int (*foo_t)(caddr_t); ... foo_t fred;
The compile gets all snarky when it finds int fred(void *) { .. }.
The VERBOSE_SYSINIT stuff sees the DDB define a lot better if we include
opt_ddb.h.
Spotted by: benno
Pointy hat to: benno
Approved by: imp (mentor)
PR: kern/119288
Submitted by: "Dan Lukes" <dan at obluda dot cz>
Check for the program headers alignment of the ELF images before
dereferencing. Unaligned access could cause panic on strict alignment
architectures.
Approved by: re (kensmith)
methods in mb_reclaim(). This is not an MFC, as debug.mpsafenet is
not present in 7.x or 8.x. In practice, this likely resulted in
instability only on kernels with INVARIANTS, as the protocol drain
paths are generally MPSAFE.
PR: 116034
Reported by: Dan Lukes <dan@obluda.cz>
Discussed with: kmacy, alc
Approved by: re (kensmith)
Tested by: Eugene Grosbein <eugen at grosbein dot pp dot ru>
- Add kern_semctl() and use it for Linux, IBCS2, and SVR4 ABIs.
- Don't pass a bufsz pointer to kern_shmctl() for operations that don't
need it.
- Add module dependencies for SYSV IPC modules to IBCS2 and SVR4.
- Use kern_shmctl() in SVR4.
- Use kern_msgctl(), kern_semctl(), and kern_shmctl() in IBCS2.
- Mark linux_ipc(), svr4_sys_shmsys(), and svr4_sys_semsys() MPSAFE.
The kernel uses two ways to write data on a pipe:
o buffered write, for chunks smaller than PIPE_MINDIRECT bytes
o direct write, for everything else
A call to writev(2) may receive struct iov of various size and the
kernel may have to switch from one solution to the other. Before doing
this, it must wake reader processes and any select/poll/kqueue up.
This commit fixes a bug where select/poll/kqueue are not triggered
when switching from buffered write to direct write. It adds calls to
pipeselwakeup().
I give more details on freebsd-arch@:
http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html
This should fix issues with Erlang (lang/erlang) and kqueue.
Reported by: Rickard Green (Erlang)
Approved by: re (kensmith)
Test that p_textvp is non-NULL be dereferencing, as no executable vnode is
set for kernel processes.
Reported by: Skip Ford <skip at menantico dot com>
Approved by: re (kensmith)
shared lookups are enabled. This closes a few races including a race where
concurrent opens of a fifo could result in different v_fifoinfo structures
in different threads.
and always require the queue to be specified to reduce diffs with HEAD.
These APIs are internal APIs only used to implement higher level primitives
such as locks and condition variables.
Approved by: alfred
where a reader blocked on a lock with no owner and just assert that it
never happens like HEAD.
- Actually set td->td_tsqueue to the sub-queue of a turnstile that a
thread is actually enqueued to. Otherwise, the kernel would always
think that threads were on the queue for exclusive (write) waiters
(queue 0). Thus, if the priority of a thread waiting on a read lock
was adjusted while it was waiting it could result in corrupting the
queue of waiting threads.
turnstile_unpend_queue() drops the lock that turnstile_release()
does. This was triggering a mtx_unlock() of an already unlocked
mutex panic.
Obtained from: Juniper Networks
Fix a kernel panic based on receiving an ICMPv6 Packet too Big message.
(MFC was planned but has been missed)
PR: 99779
Submitted by: Jinmei Tatuya
Reviewed by: clement, rwatson
Approved by: gnn (mentor)
src/sys/kern/uipc_socket.c: 1.280
Change kn_hook value from cdev to struct tty to avoid dereferencing freed
cdev.
In ttygone(), wake up select(), sigio and kevent() users in addition
to the queue sleepers.
Return EV_EOF from kevent filters if TS_GONE is set.
- In preparation of further linuxulator fixes MFC kern_descrip.c rev 1.296 and
syscallsubr.h rev 1.41 by jhb:
Add a kern_close() so that the ABIs can close a file descriptor w/o having
to populate a close_args struct and change some of the places that do.
Tested by: scf (i386, as part of a mega-MFC-patch),
Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
amd64 including:
- Add 32-bit wrappers for thr_new(), thr_suspend(), and the umtx system
calls.
- Add support to amd64 for constructing thread upcalls for 32-bit
processes.
- Leave %fs and %gs alone in the signal trampoline for 32-bit processes on
amd64.
- Add 'casuword32()' to amd64 and ia64.
Tested by: emaste