Commit Graph

123046 Commits

Author SHA1 Message Date
Robert Watson
1c53f80637 Explicitly assert socket pointer is non-NULL in tcp_input() so as to
provide better debugging information.

Prefer explicit comparison to NULL for tcpcb pointers rather than
treating them as booleans.

MFC after:	1 month
2006-03-26 01:33:41 +00:00
Pawel Jakub Dawidek
d7fad9f651 Increase debug level for "Thread exiting." message. It's not that important
and is 0 by accident.

MFC after:	3 days
2006-03-25 23:30:36 +00:00
Ed Maste
d5fd66e17d The removal of CIRCLEQ left four queue macros. One sentence was missed
in the man page update.

PR:		docs/94938
Submitted by:	Ed Schouten <ed@fxq.nl>
MFC After:	3 days
2006-03-25 23:11:10 +00:00
Poul-Henning Kamp
29ed18f45e Get the MK_FOO column right 2006-03-25 21:51:46 +00:00
Max Laier
94f2dfdd76 Loopback pf_norm.c rev. 1.106 from OpenBSD:
fixup IP checksum when modifying IP header fields

PR:		kern/93849
Obtained from:	OpenBSD
MFC after:	3 days
2006-03-25 21:15:25 +00:00
Robert Watson
3c09bd01d8 In at_setsockaddr(), assert that ddp != NULL, rather than returning an
error if it's NULL, as so_pcb != NULL is now an invariant.
2006-03-25 18:54:17 +00:00
Matt Jacob
441201ce65 Move the check for non-ATIO_CMD ahead of the cache chech so that
completion for unsupported commands doesn't abort.

Reviewed by:	nate
MFC after:	2 weeks
2006-03-25 18:18:26 +00:00
Robert Watson
818812244b Rework IPX/SPX socket and pcb reference model:
- Introduce invariant that all IPX/SPX sockets will have valid so_pcb
  pointers to ipxpcb structures, and that for SPX, the control block
  pointer will always be valid.  Don't attempt to free the socket or
  pcb at various odd points, such as disconnect.

- Add a new ipxpcb flag, IPXP_DROPPED, which will be set in place of
  freeing PCB's so that this invariant can be maintained.  This flag
  is now checked instead of a NULL check in various socket protocol
  calls.

- Introduce many assertions that this invariant holds.

- Various pieces of code, such as the SPX timer code, no longer needs
  to jump through hoops in case it frees a PCB while running.

- Break out ipx_pcbfree() from ipx_pcbdetach().  Likewise
  spx_pcbdetach().

- Comment on some SMP-related limitations to the SPX code.

- Update copyrights.

MFC after:	1 month
2006-03-25 17:28:42 +00:00
Robert Watson
92676aa962 Restructure spx_attach() to properly free memory in the event that one
of its allocations fails.  Allocate the ipxp last so as to avoid having
to free it if another allocation goes wrong.

Normalize retrieval of ipxp and cb from socket in spx_sp_attach(), and
add assertions.

MFC after:	1 month
2006-03-25 15:03:29 +00:00
Robert Watson
e7b7fc0ecd Don't bother restoring host byte order of mbuf fields when we're just
about to free the mbuf in the spx_input() error path.

MFC after:	1 month
2006-03-25 14:45:08 +00:00
Robert Watson
3945bca516 In spx_ctloutput(), acquire the ipxp lock around read operations,
especially reads of spx header structures, which will now be cached
in the stack until they can be copied out after releasing the lock.
Panic if a bad socket option direction is passed in by the caller.

MFC after:	1 month
2006-03-25 14:44:05 +00:00
Robert Watson
6d3d51f03e Slight style reformatting of spx_timers() comments; panic if an
unrecognized timer is passed into the function.

MFC after:	1 month
2006-03-25 14:29:03 +00:00
George V. Neville-Neil
a0196c3c89 First steps towards IPSec cleanup.
Make the kernel side of FAST_IPSEC not depend on the shared
structures defined in /usr/include/net/pfkeyv2.h  The kernel now
defines all the necessary in kernel structures in sys/netipsec/keydb.h
and does the proper massaging when moving messages around.

Sponsored By: Secure Computing
2006-03-25 13:38:52 +00:00
Hajimu UMEMOTO
90d1d883e9 - Use ANSI C prototype.
- Remove trailing space.
2006-03-25 11:46:37 +00:00
Poul-Henning Kamp
f5ce64b924 Update build survey scripts 2006-03-25 10:50:40 +00:00
Matt Jacob
c87e3f833c Some fairly major changes to this driver.
A) Fibre Channel Target Mode support mostly works
(SAS/SPI won't be too far behind). I'd say that
this probably works just about as well as isp(4)
does right now. Still, it and isp(4) and the whole
target mode stack need a bit of tightening.

B) The startup sequence has been changed so that
after all attaches are done, a set of enable functions
are called. The idea here is that the attaches do
whatever needs to be done *prior* to a port being
enabled and the enables do what need to be done for
enabling stuff for a port after it's been enabled.

This means that we also have events handled by their
proper handlers as we start up.

C) Conditional code that means that this driver goes
back all the way to RELENG_4 in terms of support.

D) Quite a lot of little nitty bug fixes- some discovered
by doing RELENG_4 support. We've been living under Giant
*waaaayyyyy* too long and it's made some of us (me) sloppy.

E) Some shutdown hook stuff that makes sure we don't blow
up during a reboot (like by the arrival of a new command
from an initiator).

There's been some testing and LINT checking, but not as
complete as would be liked. Regression testing with Fusion
RAID instances has not been possible. Caveat Emptor.

Sponsored by: LSI-Logic.
2006-03-25 07:08:27 +00:00
David Xu
efe33769b9 Don't cancel thread if it is in critical region. 2006-03-25 07:03:13 +00:00
Ruslan Ermilov
0472dafab4 Revert last delta, it breaks cross-compiles. 2006-03-25 06:37:36 +00:00
Scott Long
2e21a3ef7e Add a driver for the new LSI MegaRAID SAS controller family. The 'MFI' name
is derived from the phrase 'MegaRAID Firmware Interface' used by LSI.  This
driver provides a block interface to logical disks on the card and a minimal
management device.  It is MPSAFE, INTR_FAST, and 64-bit capable.

Thanks to Dell for providing hardware to test with and IronPort for
sponsoring the work.

Sponsored by: Dell, Ironport
MFC After: 3 days
2006-03-25 06:14:32 +00:00
David Xu
f656ae703e Only wake up writer if the lock is free. 2006-03-25 05:14:21 +00:00
David Xu
07c7c80074 Compile thr_rtld.c 2006-03-25 05:00:54 +00:00
David Xu
b6b894f66b Add locking support for rtld. 2006-03-25 04:49:07 +00:00
Peter Wemm
045b6fdaf6 Make gcore(1) 64 bit safe. It was trying to parse the /proc/*/map file
using sscanf and truncating the start/end entries by writing them with a
32 bit int descriptor (%x).  The upper bytes of the 64 bit vm_offset_t
variables (for little endian machines) were uninitialized.  For big endian
machines, things would have been worse because it was storing the 32 bit
value in the upper half of the 64 bit variable.  I've changed it to use
%lx and long types.  That should work on all our platforms.
2006-03-25 01:14:20 +00:00
SUZUKI Shinsuke
4b8b545e4b fixed a potential memory leak
Obtained from: KAME
MFC after: 1 day
2006-03-24 23:59:51 +00:00
Colin Percival
256c62e23f Only set the size of /usr to whatever-is-left is whatever-is-left is
greater than the size we autosized.  Without this fix, systems with
drives under 10GB can end up with very small /usr partitions...

Broken since:	January 2002
Tripped over by: simon
2006-03-24 22:45:24 +00:00
Jason Evans
0c21f9eda7 Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), and
determine its value at run time according to other relevant values.  This
avoids the creation of runs that are incompletely utilized, as long as
pagesize isn't too large (>32kB, given the current RUN_MIN_REGS_2POW
setting).

Increase the size of several structure bitfields in arena_run_t in order
to avoid integer overflow in the case that a run's header does not overlap
with the space that is usable as application allocation regions.  Given
the tiny_min_2pow change, this fix has no additional impact unless
pagesize is >32kB.

Reported by:	kris
2006-03-24 22:13:49 +00:00
Robert Watson
a52526165e Include kernel.h to get NET_NEEDS_GIANT() definition, which for some
reason compiled fine here.  I may be running with other include file
changes locally.

MFC after:	3 days
2006-03-24 20:08:48 +00:00
Sam Leffler
512537d1a4 stop device so we don't panic on card removal when active
MFC after:	3 days
2006-03-24 19:11:26 +00:00
John Baldwin
93a5035fd7 Change the -S and -t options to override each other so that the last one
specified wins to make their interaction less confusing.
2006-03-24 17:09:03 +00:00
John Baldwin
86cca1e75e Fix a bug such that if you enabled sorting by size (-S) and enabled a
flag to use a time other than modtime (-c, -u, or -U), the output would
actually be sorted by the specified time rather than size.  This does
alter the behavior in the case where both -S and -t are specified.  Now,
-S is always preferred.  Previously, -t was preferred if one of -c, -u, or
-U was specified, and -S was preferred otherwise.  Perhaps -S and -t should
override each other (last one specified wins).
2006-03-24 16:47:22 +00:00
John Baldwin
bea12be630 Add a few more references to -U. 2006-03-24 16:43:58 +00:00
John Baldwin
fe79420eb7 Add a new -U flag to instruct ls to use the birthtime for printing or
sorting.

Submitted by:	Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after:	1 week
2006-03-24 16:38:02 +00:00
SUZUKI Shinsuke
31d4137bf3 fixed a memory leak when net.inet6.icmp6.nd6_maxqueuelen is greater than 1
Obtained from: KAME
MFC after: 3 days
2006-03-24 16:20:12 +00:00
Robert Watson
b8e00b4cf4 Clean up and style(9) SPX code prior to significant functional changes
being committed:

- Wrap comments more evenly on right border.
- Clean up braces.

Also, along similar lines:

- Assert some pointers are non-NULL before dereferencing them.
- Remove one assertion that looks, on face value, poor.

MFC after:	1 month
2006-03-24 13:58:23 +00:00
Hajimu UMEMOTO
aebc6ec293 When res_nquerydomain() returns SERVFAIL, we should try next domain. 2006-03-24 13:30:10 +00:00
Warner Losh
1ab7d4c93d For each of the voltages that a card might support, make sure that the
socket also supports the voltage.  Some XV cards have appeared on the
scene (or cards that report they support XV), and in older machines
that have sockets that do not support XV, we were bogusly trying to
power them at XV rather than at 3.3V.  Now, power up the card at the
lowest voltage supported by both the card and the socket.

MFC After: 3 days
2006-03-24 07:52:00 +00:00
Warner Losh
e40dc9a60d Skeleton support for the SSC device, which implements I2S interfaces,
amoung others.
2006-03-24 07:42:33 +00:00
Kirk McKusick
982ba1cb7e Typesetting fix for -r1.137.
If a tail queue is empty the return value of TAILQ_LAST is not
undefined, it is NULL.

Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
2006-03-24 07:41:12 +00:00
Warner Losh
60a5289836 Skeleton PIO support. 2006-03-24 07:39:29 +00:00
Warner Losh
c44fe487c2 Add the sekelton of support for the Power Management Controller. 2006-03-24 07:37:56 +00:00
Warner Losh
72ec44a573 Add rtc to files.at91 2006-03-24 07:36:23 +00:00
Warner Losh
74e4c374f2 Add RTC support. This may be of dubious value since the RTC is reset
to 1998 every reboot.
2006-03-24 07:35:30 +00:00
Warner Losh
4447272cb6 Add explicit dependency on cam. This is necessary when both aha.ko and
cam.ko are modules so that aha.ko's undefined symbols can be satisfied by
cam.ko.

Sumitted by: nork
Reviewed by: scottl
2006-03-24 06:33:25 +00:00
Warner Losh
f9c68c6334 The year field is the 4 digit year (eg, 2006), not 'year - 1900' (eg
106).  Fix the comment to reflect this.
2006-03-24 06:27:34 +00:00
Ruslan Ermilov
a6a3b057da Option MK_LIB32 only exists on amd64. 2006-03-24 06:14:31 +00:00
Hajimu UMEMOTO
d05ad2ab4d When res_send() fails, we should reserve an error code. 2006-03-24 04:49:30 +00:00
David Xu
c147998f53 set an upper limit for thread structures which can be allocated. 2006-03-24 04:34:06 +00:00
David Xu
3c77872824 Implement SIGEV_THREAD notification for aio_fsync. 2006-03-24 03:24:27 +00:00
David Xu
dbbccfe923 1. Move code for scanning pending I/O from aio_fsync to aio_aqueue,
it has less overhead.
2. Avoid scheduling task if maximum number of I/O threads is reached.
2006-03-24 00:50:06 +00:00
Jason Evans
efafcfa7fb Add USE_BRK-specific code in malloc_init_hard() to allow the first
internally used chunk to start at the beginning of the heap, rather
than at a chunk-aligned address.  This reduces mapped memory somewhat
for 32-bit architectures.

Add the arena_run_link_t type and use it wherever a run object is only
used as a ring 'header'.  This saves approximately 40 kB of memory per
arena.

Remove an obsolete (no longer used) code path from base_alloc(), which
supported the internal allocation of objects larger than the chunk
size.

Enhance chunk_dealloc() to cache chunk addresses for all deallocated
chunks.  This has no impact for most programs, but has the potential
to reduce VM map fragmentation for programs that use huge
allocations.
2006-03-24 00:28:08 +00:00