Commit Graph

117478 Commits

Author SHA1 Message Date
Jeff Roberson
e8ddb61d38 - Replace the series of DEBUG_LOCKS hacks which tried to save the vn_lock
caller by saving the stack of the last locker/unlocker in lockmgr.  We
   also put the stack in KTR at the moment.

Contributed by:		Antoine Brodin <antoine.brodin@laposte.net>
2005-08-03 04:48:22 +00:00
Jeff Roberson
d0f5f62d8b - Add support for saving stack traces and displaying them via printf(9)
and KTR.

Contributed by:		Antoine Brodin <antoine.brodin@laposte.net>
Concept code from:	Neal Fachan <neal@isilon.com>
2005-08-03 04:33:48 +00:00
Jeff Roberson
8d511e2a05 - Add support for saving stack traces and displaying them via printf(9)
and KTR.

Contributed by:		Antoine Brodin <antoine.brodin@laposte.net>
Concept code from:	Neal Fachan <neal@isilon.com>
2005-08-03 04:27:40 +00:00
Sam Leffler
f0abdaaa64 simplify use with non-ath devices; search the wlan sysctl nodes to
locate the right one for the specified interface

MFC after:	3 days
2005-08-03 04:25:04 +00:00
Jeff Roberson
bb2fd058ce - Improve the definition of INKERNEL() to include the DMAP area and the
proper start of the kernel area.

Discussed with:	peter
2005-08-03 04:21:51 +00:00
David E. O'Brien
722d16b7fc Document 'kernel-toolchain'.
Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2005-08-03 03:26:57 +00:00
Daniel Eischen
2ce2892eaf Add usleep to the map files.
Noticed by:	davidxu
2005-08-03 01:54:52 +00:00
David Xu
3c424d1447 In adjustrunqueue(), add code to handle thread migrating case for
ULE scheduler. In original code, local run queue of threaded ksegrp
is corrupted if adjustrunqueue() is called while thread is migrating.
2005-08-03 01:23:45 +00:00
Daniel Eischen
7f2461f315 Add a cancellation point for usleep(). 2005-08-03 00:48:13 +00:00
Robert Watson
358371dcec Back out change accidentally committed as Makefile:1.21 -- a local
tweak to let the 6.x/7.x kernel series build on a 5.x userland.

Pointed out by:		njl
2005-08-03 00:47:33 +00:00
Daniel Eischen
14d5987375 Add a cancellation point for usleep().
While here, fix sleep() so that it is also a cancellation point (a
missing weak reference prevented that).
2005-08-03 00:47:31 +00:00
Daniel Eischen
ed0b0abcf7 Make syslog() use the internal (non-cancellation point) _usleep().
Prior to this it was calling the cancellable usleep() while holding
a lock.
2005-08-03 00:45:58 +00:00
Daniel Eischen
8450917472 Make usleep() overridable by the thread libraries so they can provide
cancellation points.

Noticed by:	phk
2005-08-03 00:44:25 +00:00
Daniel Eischen
78956f2474 Add namespace #defines for usleep. 2005-08-03 00:43:14 +00:00
Robert Watson
13b203d0d7 Modify device drivers supporting multicast addresses to lock if_addr_mtx
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintained list.

Problem reported by:	Ed Maste (emaste at phaedrus dot sandvine dot ca>
MFC after:		1 week
2005-08-03 00:18:35 +00:00
Robert Watson
bccb41014a Modify network protocol consumers of the ifnet multicast address lists
to lock if_addr_mtx.

Problem reported by:	Ed Maste <emaste at phaedrus dot sandvine dot ca>
MFC after:		1 week
2005-08-02 23:51:22 +00:00
Robert Watson
c3b31afd92 Protect link layer network interface multicast address list manipulation
using ifp->if_addr_mtx:

- Initialize if_addr_mtx when ifnet is initialized.

- Destroy if_addr_mtx when ifnet is torn down.

- Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
  Staticize.

- Extract ifmultiaddr allocation and initialization into if_allocmulti();
  accept a 'mflags' argument to indicate whether or not sleeping is
  permitted.  This centralizes error handling and address duplication.

- Extract ifmultiaddr tear-down and deallocation in if_freemulti().

- Re-structure if_addmulti() to hold if_addr_mtx around manipulation of
  the ifnet multicast address list and reference count manipulation.
  Make use of non-sleeping allocations.  Annotate the fact that we only
  generate routing socket events for explicit address addition, not
  implicit link layer address addition.

- Re-structure if_delmulti() to hold if_addr_mtx around manipulation of
  the ifnet multicast address list and reference count manipulation.
  Annotate the lack of a routing socket event for implicit link layer
  address removal.

- De-spl all and sundry.

Problem reported by:	Ed Maste <emaste at phaedrus dot sandvine dot ca>
MFC after:		1 week
2005-08-02 23:23:26 +00:00
Sean Chittenden
71997d4be4 Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8). 2005-08-02 21:38:03 +00:00
John Baldwin
9d61a2e638 Include a SYSUNINIT() to destroy the mutex in MTX_SYSINIT. This makes
MTX_SYSINIT mutexes play well with modules that can be unloaded.

Reported by:	sam
MFC after:	3 days
2005-08-02 20:50:45 +00:00
Ruslan Ermilov
a5de1230a9 Add missing check for the NO_CRYPT build option.
Reported by:	Alexander Polakov
2005-08-02 20:12:30 +00:00
Poul-Henning Kamp
511dca89b7 polish various bits. 2005-08-02 20:09:45 +00:00
Poul-Henning Kamp
d9f9156b84 Ignore CVS directories 2005-08-02 20:09:24 +00:00
Ruslan Ermilov
0515d4fd73 Fix up the comment. 2005-08-02 20:06:48 +00:00
Ruslan Ermilov
91b756f435 Fixed parsing of unsigned integers. 2005-08-02 20:05:37 +00:00
Ruslan Ermilov
2319835713 Long overdue, keep up with mbuf.h,v 1.148. 2005-08-02 20:03:23 +00:00
Sam Leffler
aeffcba3c1 Wireless suport fixups: add a bunch of stuff that's been in the
code but not documented (e.g. wme, mac acl) and correct some
information, etc.

Reviewed by:	brueffer
2005-08-02 19:13:13 +00:00
Sam Leffler
491e9810c0 eliminate the regex used to match ethernet and 802.11 devices;
instead use the interface's media-type

Reviewed by:	imp
MFC after:	1 week
2005-08-02 18:28:31 +00:00
Robert Watson
09df718e0e When allocating link layer ifnet address list entries in
ifp->if_resolvemulti(), do so with M_NOWAIT rather than M_WAITOK, so
that a mutex can be held over the call.  In the FDDI code, add a
missing M_ZERO.  Consumers are already aware that if_resolvemulti()
can fail.

MFC after:	1 week
2005-08-02 17:52:52 +00:00
Robert Watson
de6073aab0 Add if_addr_mtx to struct ifnet, a mutex to protect ifnet-related address
lists.  Add accessor macros.

This changes the size of struct ifnet, but ideally, all ifnet consumers
are now using if_alloc() to allocate these structures rather than
embedding them into device driver softc's, so this won't modify the
network device driver ABI.

MFC after:	1 week
2005-08-02 17:43:35 +00:00
Maksim Yevmenkin
c20990577c Do not lock an to check gone flag. Only need to hold the lock to set
the gone flag.

Reviewed by:	imp
MFC after:	1 day
2005-08-02 16:03:51 +00:00
Christian Brueffer
6fc6b69327 Mention that the softc is zeroed after allocation.
Noticed by:	sam
MFC after:	3 days
2005-08-02 13:54:52 +00:00
Christian Brueffer
906507dd4c - add missing ether_poll_deregister
- add per-device polling
- move the setting of if_capenable further down so that the
  VLAN caps are honored as well

Approved by:	ru
MFC after:	2 weeks
2005-08-02 09:27:42 +00:00
Ruslan Ermilov
b34b221d77 Add missing ether_poll_deregister(). This is still not enough to
kldunload/kldload without a panic.  The same (but worse) problem
is also present in ixgb(4).
2005-08-02 08:44:45 +00:00
Tim Kientzle
01122e2ae0 Generate default fake "device" and "inode" numbers for entries
extracted from tar archives.  Otherwise, converting tar archives to
cpio format (with "bsdtar -cf out.cpio @in.tar") convert every entry
into a hard link to a single file.  This simple logic breaks hard
links, but that's better than the alternative.

MFC after: 7 days
2005-08-02 03:17:57 +00:00
Tim Kientzle
0f61624bd1 When copying time values from the main entry header to be used in the
header of the pax extension entry, clip them to ustar limits.  In particular,
this prevents an internal panic for very old files.

Thanks to: Chris Spiegel
MFC after: 7 days
2005-08-02 03:13:42 +00:00
Tim Kientzle
a2e467d35a Correct a few minor mis-statements (libarchive does support reading
GNU tar sparse files, people have extended cpio) and clarify an
important detail about pax format (that ustar-compliant archivers
can mostly read pax archives correctly).

MFC after: 7 days
2005-08-02 03:10:52 +00:00
Tim Kientzle
5d596ecb25 The bsdtar_warnc() reporting function requires the program name to be
set up before it is called, so move the progname initialization before
the first possible call to bsdtar_warnc().

Thanks to: Stanislav Sedov
PR: bin/83366
MFC after: 7 days
2005-08-02 03:02:55 +00:00
Brooks Davis
fe6f40dd76 - Document network_interfaces=auto (the default!).
- Remove documentation of pccard_ifconfig as it is now gone.
 - Document pccard_ifconfig's replacement ifconfig_DEFAULT.
2005-08-02 02:24:47 +00:00
Robert Watson
c753d56b39 Teach vmstat's domemstat_zone() to use memstat_kvm_uma() when the kvm
descriptor is non-NULL, restoring vmstat -z support for core dumps and
kmem access.  These were broken with the introduction of UMA.
2005-08-01 21:33:17 +00:00
Kelly Yancey
dcb5fef5db Make getsockopt(..., SOL_SOCKET, SO_ACCEPTCONN, ...) work per IEEE Std
1003.1 (POSIX).
2005-08-01 21:15:09 +00:00
Robert Watson
33c20d188c Add memstat_kvm_uma(), an implementation of a libmemstat(3) query routine
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3).  The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).

With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.

In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.
2005-08-01 19:07:39 +00:00
Eric Anholt
786d03d56a Fix a buffer aging problem in new r300 code that could lead to hangs with some
apps.

Obtained from:	DRM CVS
2005-08-01 17:50:19 +00:00
Maxim Sobolev
c035ac04e6 Propagate error code of kern_execve() to the caller properly.
PR:		81670
Submitted by:	Andrew Bliznak <andriko.b@gmail.com>
Pointy hat to:	sobomax
2005-08-01 17:35:48 +00:00
Sam Leffler
7c0cbd3bfa acm and ack are specified per-ac
MFC after:	3 days
2005-08-01 16:34:41 +00:00
Tai-hwa Liang
0b1ae45dc5 Fixing compilation error by:
- Conforming to the latest ether_ifattach() change;
	- Moving PCCARD_API_LEVEL to the right place.

Reported and Tested by:	Vladimir Grebenschikov <vova at fbsd dot ru>
MFC after:		3 days
2005-08-01 13:51:52 +00:00
Robert Watson
22247a2a38 Correct two libmemstat(3) bugs:
- Move memory_type_list flushing logic from memstat_mtl_free() to
  _memstat_mtl_empty(), a libmemstat-internal function that can
  be called from other parts of the library.  Invoke
  _memstat_mtl_empty() from memstat_mtl_free(), which also frees
  the containing list structure.

  Invoke _memstat_mtl_empty() instead of memstat_mtl_free() in
  various error cases in memstat_malloc.c and memstat_uma.c, which
  previously resulted in the list being freed prematurely.

- Reverse the order of updating the mt_kegfree and mt_free fields
  of the memory_type in memstat_uma.c, otherwise keg free items
  won't be counted properly for non-secondary zones.

MFC after:	3 days
2005-08-01 13:18:21 +00:00
Poul-Henning Kamp
e1d9e33240 The Berkeley pascal implementation for the VAX 11/780 has only
historical relevance these days, stow it in the attic instead of
on millions of FreeBSD computers.
2005-08-01 12:14:53 +00:00
Poul-Henning Kamp
efdb465402 Remove the \*(DY at the end of the document, it makes the installed
file differ for each install.
2005-08-01 12:10:14 +00:00
Hajimu UMEMOTO
4dad226e45 recover the line which was wrongly disappeared during scope cleanup.
tcpdrop(8) should work for IPv6, again.
2005-08-01 12:08:49 +00:00
Poul-Henning Kamp
7abfae504a typo 2005-08-01 08:24:03 +00:00