freebsd-nq/sys
Gleb Smirnoff d1426d7fc5 Locking and cleanup of tty netgraph node. Tty stack is Giant-locked,
so we need to acquire Giant in netgraph methods, so that we don't
race with line discipline methods. Remove NET_NEEDS_GIANT.

- Packets coming into node from netgraph are queued in ifqueue
  attached to node private data.
- Mutex in struct ifqueue is used to lock not only the queue, but
  the whole private data, and tp->t_lsc field.
- tp->t_lsc pointer is used to indicate whether line discipline is
  attached to netgraph or not.
- Use FLG_DIE flag to indicate that node may be destroyed.
  (This protection doesn't work, and it didn't before. Must be redesigned.)
- Increment ngt_unit atomically, removing mutex.
- Acquire Giant, when executing ngt_start() from netgraph context.
- Acquire Giant, when {,de}registering line discipline.
- Uncomment forcing queue mode on peers hook, since this is reasonable.
- Force queue mode on our hook, to avoid acquiring Giant when coming from
  network stack. We may already hold some mutexes at this point.

Cleanups:
- Use callout_pending() instead of our own flag.
- Remove spl(9) calls. Now we can use return() instead of ERROUT().

style(9):
- Sort includes.
- Sparse initializer for struct linesw.
- Remove some empty lines, sort declarations.

Reviewed by:	julian, phk
MFC after:	1 month
2005-01-13 07:43:12 +00:00
..
alpha These are no longer relevant. They are scripts for extracting hints 2005-01-07 00:54:35 +00:00
amd64 There are no PC98 amd64 machines, so gc a few stray ifdefs. 2005-01-11 03:44:17 +00:00
arm Add support for ptrace() and gdb breakpoints. 2005-01-10 22:43:16 +00:00
boot Only update the boot sector when there is a valid drive number provided. 2005-01-09 23:30:35 +00:00
cam Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
coda Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC(). 2005-01-11 07:36:22 +00:00
compat Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
conf Improve previous commit with regards to the user check. 2005-01-13 00:21:38 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r140094, 2005-01-12 00:52:40 +00:00
crypto Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
ddb Start each of the license/copyright comments with /*- 2005-01-06 01:34:41 +00:00
dev MFp4: 2005-01-11 07:34:13 +00:00
doc Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
fs Use off_t when passing and calculating file offsets. While a single 2005-01-12 06:42:13 +00:00
gdb /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom Introduce a new GEOM class - SHSEC. It provides sharing secret between 2005-01-11 18:06:44 +00:00
gnu Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE() 2005-01-11 09:10:46 +00:00
i4b /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i386 Try harder to work with MP table interrupt entries that claim that an 2005-01-12 18:24:32 +00:00
ia64 /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
isa Make life for owners of Synaptics Touchpads more pleasant :-) 2005-01-10 13:05:58 +00:00
isofs/cd9660 Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE() 2005-01-11 09:10:46 +00:00
kern When re-connecting already connected datagram socket ensure to clean 2005-01-12 10:15:23 +00:00
libkern /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-07 00:24:33 +00:00
modules Connect SHSEC GEOM class to the build. 2005-01-11 18:18:40 +00:00
net Fix a typo in a comment that may be confusing if one doesn't really 2005-01-11 10:47:51 +00:00
net80211 Correct scan candidate selection logic for dual-band devices: prefer 2005-01-01 17:48:27 +00:00
netatalk /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
netatm /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
netgraph Locking and cleanup of tty netgraph node. Tty stack is Giant-locked, 2005-01-13 07:43:12 +00:00
netinet Fix a TCP SACK related crash resulting from incorrect computation 2005-01-12 21:40:51 +00:00
netinet6 /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
netipsec /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
netipx Mark the IPX netisr as MPSAFE so that inbound IPX traffic is processed 2005-01-09 07:34:55 +00:00
netkey fixed an unexpected addr/port matching failure in IPv6 SA management 2005-01-10 13:06:42 +00:00
netnatm /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
netncp /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
netsmb /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfs /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfs4client This file fell out of the list when adding bufsync. 2005-01-11 11:36:26 +00:00
nfsclient Include opt_bootp.h for BOOTP_NFSROOT 2005-01-12 12:42:46 +00:00
nfsserver Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC(). 2005-01-11 07:36:22 +00:00
opencrypto /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pc98 In my last commit, I'd assumed that LINE30 was always defined. It 2005-01-09 22:17:39 +00:00
pccard /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pci Reimplement the fix in rev. 1.126. 2005-01-10 09:56:47 +00:00
posix4 /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
powerpc - allow a device hint to disable probing a slot on a Uninorth PCI bus. 2005-01-11 08:09:50 +00:00
rpc /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
security Exempt the superuser from mac_seeotheruids checks. 2005-01-03 12:08:18 +00:00
sparc64 Don't panic when we're asked to allocate a resource type that we know 2005-01-09 18:58:08 +00:00
sys Let _umtx_op directly return error code rather than from errno because 2005-01-12 05:55:52 +00:00
tools /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
ufs Add BO_SYNC() and add a default which uses the secret vnode pointer 2005-01-11 10:43:08 +00:00
vm Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC(). 2005-01-11 07:36:22 +00:00
Makefile Add a NO_BOOT knob to prevent building the boot blocks and loader. 2004-08-19 09:54:28 +00:00