like it is a device_t.
In tap_clone_creator(), set cf_fstate to FSTATE_FOUND instead of
_NOTFOUND to avoid a panic in config_detach() on a DIAGNOSTIC
kernel. XXX I'm not sure that that is the right fix.
These changes should put a stop to the crash described in kern/38759.
an AF_LINK socket, only, to be consistent with SIOC[ADG]LIFADDR
behavior on AF_INET and AF_INET6 sockets. Let us create AF_LINK
sockets for this purpose. Note that most operations on AF_LINK
sockets are not implemented.
Move the function+line printing into GRE_DPRINTF().
Retire gre_closef(). Retire gre_join(). Constify gre_reconf(),
and don't pass it an LWP any longer.
Make this work in the new file descriptor regime. Add a kernel
thread per gre(4) instance whose purpose is to install the socket
into proc0's file descriptor table. Add gre_fp_send() and
gre_fp_recv() for passing file_t pointers to proc0.
Fix locking: don't solock() in the socket upcall, where it is
already held. Do solock() before calling soconnect().
Simplify reconfiguration.
Update a comment that mentions finding a less specific route, since
we don't do that any more.
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:
- Inspecting process state requires thread context, so signals can no longer
be sent from a hardware interrupt handler. Signal activity must be
deferred to a soft interrupt or kthread.
- As the proc state locking is simplified, it's now safe to take exit()
and wait() out from under kernel_lock.
- The system spends less time at IPL_SCHED, and there is less lock activity.
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.
With much feedback from matt@ and plunky@.
failure of wpa_supplicant(8) to re-key promptly, as reported in
http://mail-index.netbsd.org/tech-net/2008/04/18/msg000459.html
- Make bpf's read timeout work more correctly with select/poll.
- A fix for catchpacket() which delays calling bpf_wakeup() until
the state has been updated.
(rev 1.125): correct the check for fd_getsock() failure in
gre_socreate().
The second bug is more complicated to fix. Since rev 1.125,
gre_reconf() is using the file descriptor table of the current
process instead of the process 0's (the kernel's).