Commit Graph

118356 Commits

Author SHA1 Message Date
Robert Watson
526e258d3a Assert that (vp) is locked in fifo_close(), since we rely on the
exclusive vnode lock to synchronize the reference counts on struct
fifoinfo.

MFC after:	3 days
2005-09-18 10:44:50 +00:00
Robert Watson
7da7362b95 Re-comment sbcompress() to explain what it is it does; it took me
quite a bit of reading to figure it out, and I want to avoid figuring
it out again.

Convert an if (foo) else printf("this is almost a panic") into a
KASSERT.

MFC after:	3 days
2005-09-18 10:30:10 +00:00
Christian Brueffer
61a5cd0bd1 Sort the list of disk controllers by driver-name. The notable exception is
ata(4), which should stay on top.

MFC after:	3 days
2005-09-18 08:14:16 +00:00
Christian Brueffer
6b5a083bf2 Sort the list of ethernet devices by driver-name.
MFC after:	3 days
2005-09-18 07:46:05 +00:00
Christian Brueffer
929962108a Sort list of supported hardware.
MFC after:	3 days
2005-09-18 07:32:49 +00:00
Christian Brueffer
f412af9750 Don't claim matcd(4) support, it was removed long ago.
MFC after:	3 days
2005-09-18 07:23:53 +00:00
Christian S.J. Peron
33cdc78d01 Introduce a kernel config for the Mandatory Access Control framework.
This kernel config briefly describes some of the major MAC policies
available on FreeBSD. The hope is that this will raise the awareness
about MAC and get more people interested.

Discussed with:	scottl
2005-09-18 03:15:36 +00:00
Yoshihiro Takahashi
a382309a4e Merged from src/sbin/fdisk/fdisk.c revision 1.81.
- Call gctl_free() to free resource allocated with gctl_get_handle().

MFC after:	3 days
2005-09-18 02:38:29 +00:00
Warner Losh
62061bf002 MFi386: pci attribute allocation fixes. 2005-09-18 01:42:43 +00:00
Warner Losh
fe0519b171 MFp4: Expose device_probe_child() 2005-09-18 01:32:09 +00:00
Warner Losh
e429f92618 Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus
implementation, like other routines in the legacy bus.

This should fix problems with resource allocation on MP systems without
ACPI enabled.
2005-09-17 23:57:53 +00:00
Christian S.J. Peron
d1c48a07c3 Remove reference to bpfstat, this no longer exists. 2005-09-17 23:45:22 +00:00
Christian S.J. Peron
42e7197fba Implement new world order in VFS locking for ACLs. This will remove the
unconditional acquisition of Giant for ACL related operations. If the file
system is set as being MP safe and debug.mpsafevfs is 1, do not pickup
giant.

For any operations which require namei(9) lookups:

__acl_get_file
__acl_get_link
__acl_set_file
__acl_set_link
__acl_delete_file
__acl_delete_link
__acl_aclcheck_file
__acl_aclcheck_link

-Set the MPSAFE flag in NDINIT
-Initialize vfslocked variable using the NDHASGIANT macro

For functions which operate on fds, make sure the operations are locked:

__acl_get_fd
__acl_set_fd
__acl_delete_fd
__acl_aclcheck_fd

-Initialize vfslocked using VFS_LOCK_GIANT before we manipulate the vnode

Discussed with:	jeff
2005-09-17 22:01:14 +00:00
Colin Percival
6a15313d24 Handle circular dependencies properly (via errx(3)) rather than dumping
core.  This bug was made visible by a recent change to the audio/timidity++
port, which now has itself as a run dependency.

Reported by:	Emil Mikulic, Andreas Klemm
2005-09-17 15:30:16 +00:00
Joel Dahl
90412be1fd Bump .Dd
Reminded by:	simon
2005-09-17 15:13:22 +00:00
Craig Rodrigues
1c47852f8a Clarify wording for -m flag.
PR:	docs/84704
2005-09-17 15:10:39 +00:00
Craig Rodrigues
d63612b470 Call gctl_free() to free resource allocated with gctl_get_handle().
PR:		bin/84664
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after:	3 days
2005-09-17 14:56:10 +00:00
Craig Rodrigues
387d535430 Fix so that color changes are not lost when the video mode changes.
PR:	bin/83553
Submitted by:	Dan Lukes <dan at obluda dot cz>
2005-09-17 12:52:04 +00:00
Damien Bergamini
0b74a28506 o Add initial bits for IBSS support.
o Allow association with APs that do not broadcast SSID (with hints from
  Nick Hudson and Hajimu Umemoto).
o IFQ_DRV_PREPEND mbuf when h/w ring is full so it can be sent later.
o Increment if_oerrors when appropriate.
o Did some cleanup while I'm here.

MFC after:	1 day
2005-09-17 12:41:05 +00:00
Joel Dahl
c1706c47b5 Add cdce(4).
Reviewed by:	brueffer
2005-09-17 09:35:56 +00:00
Joel Dahl
d1625404ac Add HARDWARE section.
Reviewed by:	brueffer
2005-09-17 09:20:16 +00:00
Marcel Moolenaar
233b044b9b Complete rewrite in preparation of adding support for control
requests. The following features have been added:
1. Extensive checking and validation of both the primary and
   secondary headers to protect against corrupted data and to
   take advantage of the redundancy to allow the GPT to be
   used in the face of recoverable corruption.
2. Dynamic data-structures to avoid hardcoding gratuitous
   table limits so as to support the creation of GPT tables
   of (as of yet) unspecified size.
3. Only allow kernel dumps to swap partitions to provide the
   necessary anti-footshooting measures. Linux swap partitions
   are allowed.
4. Complete dump of the GPT configuration, including labels.
5. Supports Byte Order Mark (U+FEFF) handling for big-endian,
   little-endian and mixed-endian partition names.
2005-09-17 07:05:17 +00:00
Marcel Moolenaar
2d48a58f9f o Change the type of the ent_name field from short to uint16_t.
UTF-16 characters are not negative.
o  Change the corresponding comment from UNICODE-16 to UTF-16.
   There's no such thing as UNICODE-16.
2005-09-17 06:34:18 +00:00
Eric Anholt
e3e1ac8615 Add a new AGP driver for ATI IGP chipsets. The driver is based on reading of
the Linux driver, since specs are unavailable.  Many thanks to Adam Kirchhoff
for multiple useful testing cycles, and Ralf Wostrack for the final fix to get
it working.

PR:		i386/75251
Submitted by:	anholt
2005-09-17 03:36:47 +00:00
Eric Anholt
695b15ca91 Fix agp_nvidia.c to behave more like the linux driver, fixing DRI on Radeon
9200 according to one responder.  The primary issue was not setting some bits
to say that the entries were active, but also fix one place where some memory
wasn't being used as volatile as it should.  While here, change some use of ffs
to a relatively short case statement, to make it more obvious what's going on.

PR:		kern/71638, kern/72372, kern/71547?
Submitted by:	Andrew J. Caines <A.J.Caines@halplant.com>,
		Robin Schoonover <end@endif.cjb.net>,
		Jason Henson <jason@ec.rr.com>
2005-09-16 22:59:47 +00:00
Alexander Kabaev
4ece38b4ec Include <sys/defs.h> to get __ISO_C_VISIBLE definition is one is not
already available.
2005-09-16 21:24:10 +00:00
Alexander Kabaev
046b7565e6 Do not expose vfwscanf, vswscanf, vwscanf and wcstof functions if
they are not visible from wchar.h.
2005-09-16 20:56:17 +00:00
Ruslan Ermilov
83908c6560 The arguments to printf() were swapped. 2005-09-16 20:38:33 +00:00
Tor Egge
61ac14dab6 Break out of loop if next buffer pointer has become invalid while flushing
current buffer.

Reviewed by:	kan
2005-09-16 18:28:12 +00:00
Ruslan Ermilov
fead0681ed Fix "struct ifnet" leak if attach() fails in the middle. 2005-09-16 12:49:06 +00:00
Yaroslav Tykhiy
ffdd61c31d Do assorted nitpicking in diagnostics while I'm here:
- Use __func__ consistently instead of copying function name
  to message strings.  Code tends to migrate around source files.
- DIAGNOSTIC is for information, INVARIANTS is for panics.
2005-09-16 12:24:28 +00:00
Ruslan Ermilov
330fd412b5 Avoid deferencing NULL in if_free(). 2005-09-16 12:17:12 +00:00
Yaroslav Tykhiy
14e9825634 It's nice to have relevant comments both in if {} and else {},
not in just one of them.
2005-09-16 11:58:58 +00:00
Yaroslav Tykhiy
f4ec4126bb Test the new M_VLANTAG packet flag before calling
m_tag_locate().  This adds little overhead of a simple
bitwise operation in case hardware VLAN acceleration
is on, yet saves the more expensive function call if
the acceleration is off.

Reviewed by:	ru, glebius
X-MFC-after:	6.0
2005-09-16 11:44:43 +00:00
Ruslan Ermilov
ad61f89618 Fix "struct ifnet" leaks when attach() fails in the middle. 2005-09-16 11:25:19 +00:00
Pawel Jakub Dawidek
8b28aef238 Pidfiles should be created with permission preventing users from opening
them for reading. When user can open file for reading, he can also
flock(2) it, which can lead to confusions.

Pointed out by:	green
2005-09-16 11:24:28 +00:00
Ruslan Ermilov
3badacee8c Fix "struct ifnet" leaks when attach() fails in the middle, e.g.
when mii_phy_probe() or bus_setup_intr() fails.  For drivers that
call their detach() in this case, call if_free() there to cover
this case too.
2005-09-16 11:11:51 +00:00
Ruslan Ermilov
c4c6f08f68 Fix "struct ifnet" leak on detach. 2005-09-16 10:09:23 +00:00
Ruslan Ermilov
4180ad4d15 Add missing mtx_destroy() when if_alloc() fails.
Add missing if_free() when mii_phy_probe() fails.
Put if_free() into the correct #ifdef in detach().
2005-09-16 09:20:58 +00:00
Ruslan Ermilov
94a7d18b08 Add missing if_free() in rue_detach(). 2005-09-16 09:16:46 +00:00
Warner Losh
dca2069084 Commit a workaround to a problem with resource allocation. This helps
with some Dell servers that booted w/o a problem[*] on 5.4, but failed
with 6.0-BETA.

On the PCI bus, when we do lazy resource allocation, we narrow the
range requested as we pass through bridges to reflect how the bridges
are programmed and what addresses they pass.  However, when we're
doing an allocation on a bus that's directly connected to a host
bridge, no such translation can take place.  We already had a fallback
range for memory requests, but none for ioports.  As such, provide a
fallback for I/O ports so we don't allocate location 0, which will
have undesired side effects when the resources are actually used.

This fixes a problem with booting a Dell server with usb in the
kernel.  However, it is an unsatisfying solution.  I don't like the
hard coded value, and I think we should start narrowing the resources
returned to not be in the so-called isa alias area (where the ranage &
0x0300 must be 0 iirc).  Doing such filtering will have to wait for
another day.

This may be a good 6 candidate, maybe after its had a chance to be
refined.

Tested by: glebius@
2005-09-16 07:02:29 +00:00
SUZUKI Shinsuke
9689258fb5 plugged a possible memory leak
Obtained from: KAME
MFC after: 1 day
2005-09-16 01:42:50 +00:00
Matt Jacob
3b87a552e4 Make the exploring of all luns supported by an HBA more of a
tunable (until we get REPORT LUNS in place).

If we're probing luns, and each probe succeeds, we keep going past
lun 7 if we're a SCSI3 or better device (until we fail to probe).

If we're probing luns, and a probe fails, we only keep going if
we're quirked *for* it (CAM_QUIRK_HILUNS), and if we're not quirked
*against* it (CAM_QUIRK_NOHILUNS), or we're a SCSI3 or better device
and the tunable (kern.cam.cam_srch_hi) is set non-zero.

Reviewed by:	nate@rootlabs.org, gibbs@scsiguy.com, ken@kdm.com, scottl@samsco.org
MFC after:	1 week
2005-09-16 01:26:17 +00:00
Poul-Henning Kamp
59307b0dfe Don't attempt to recurse lockmgr, it doesn't like it. 2005-09-15 21:16:43 +00:00
Stephan Uphoff
19b2dff7b0 Fix race condition that caused activation of an event to
be ignored immediately after it was deactivated.

Found by: 	Yahoo!
MFC after:	3 days
2005-09-15 21:10:12 +00:00
John Baldwin
21f9e816cd Oops, missed adding the required include.
Pointy hat to:	jhb
2005-09-15 20:20:36 +00:00
John Baldwin
53c0e1ff7d Replace the dont_sleep_in_callout mutex hack (similar to g_x{up,down})
with the disallow sleeping facility.
2005-09-15 20:09:08 +00:00
John Baldwin
10f508d9a3 Don't disallow sleeping for handlers on swi's since some swi handlers
(like CAM) do sleep in their handlers.

Requested by:	scottl
2005-09-15 20:08:21 +00:00
Ruslan Ermilov
5ae7c95cc3 Add two missing if_free() calls. 2005-09-15 20:06:44 +00:00
Ruslan Ermilov
35fb201bbe Fixed a diagnostic message. 2005-09-15 19:41:03 +00:00