Commit Graph

50869 Commits

Author SHA1 Message Date
rwatson
22be685755 Convert a GIANT_REQUIRED; into a NET_ASSERT_GIANT();, as sockets are
now only conditionally protected by Giant based on debug.mpsafenet.
2004-12-05 22:50:09 +00:00
cognet
49745b3e73 Make sure to map the whole kernel into 1MB pages. Try to use the remaining
memory for things such as the kernel stack.
2004-12-05 22:48:04 +00:00
rwatson
47b5ad626d Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in
the tcptw undergo non-atomic read-modify-writes.

MFC after:	2 weeks
2004-12-05 22:47:29 +00:00
cognet
1286f9fc64 Reactivate the use of the minidata cache. 2004-12-05 22:47:25 +00:00
cognet
d852f75fe8 Do not change the page directory and do not flush the TLB when switching to
a kernel thread.
2004-12-05 22:46:59 +00:00
cognet
8c5a104a40 Remove an unused field from the struct pv_entry.
While I'm there, fix style.
2004-12-05 22:46:30 +00:00
phk
6c14f71ef7 VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases
doesn't.  Most of the implementations have grown weeds for this so they
copy some fields from mnt_stat if the passed argument isn't that.

Fix this the cleaner way:  Always call the implementation on mnt_stat
and copy that in toto to the VFS_STATFS argument if different.
2004-12-05 22:41:02 +00:00
marcel
8b42e21d12 Fix null-pointer indirect function calls introduced in the previous
commit. In the new world order, the transitive closure on the vector
operations is not precomputed. As such, it's unsafe to actually use
any of the function pointers in an indirect function call. They can
be null, and we need to use the default vector in that case.
This is mostly a quick fix for the four function pointers that are
ed explicitly. A more generic or scalable solution is likely to see
the light of day.

No pathos on: current@
2004-12-05 22:30:28 +00:00
rwatson
a12b213cad Assert inpcb lock in:
tcpip_fillheaders()
  tcp_discardcb()
  tcp_close()
  tcp_notify()
  tcp_new_isn()
  tcp_xmit_bandwidth_limit()

Fix a locking comment in tcp_twstart(): the pcbinfo will be locked (and
is asserted).

MFC after:	2 weeks
2004-12-05 22:27:53 +00:00
rwatson
386bd91d54 Minor grammer fix in comment. 2004-12-05 22:20:59 +00:00
rwatson
338b787cfd Pass the inpcb reference into ip_getmoptions() rather than just the
inp->inp_moptions pointer, so that ip_getmoptions() can perform
necessary locking when doing non-atomic reads.

Lock the inpcb by default to copy any data to local variables, then
unlock before performing sooptcopyout().

MFC after:	2 weeks
2004-12-05 22:08:37 +00:00
rwatson
f2988d54de Define INP_UNLOCK_ASSERT() to assert that an inpcb is unlocked.
MFC after:	2 weeks
2004-12-05 22:07:14 +00:00
alc
fcf141e6aa Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted
the implementation of vm_pindex_t from 32 to 64 bits.  (Thus, RELENG_4 is
not affected.)  The consequence of this error would be a legimate write to
an extremely large file being treated as an errant attempt to write meta-
data.

Discussed with: tegge@
2004-12-05 21:48:11 +00:00
rwatson
514977fc0b Push the inpcb argument into ip_setmoptions() when setting IP multicast
socket options, so that it is available for locking.
2004-12-05 21:38:33 +00:00
obrien
70d525536e When panicing in device_unbusy(), actually tell what device has the issue. 2004-12-05 20:58:56 +00:00
rwatson
ef102033be Start working through inpcb locking for ip_ctloutput() by cleaning up
modifications to the inpcb IP options mbuf:

- Lock the inpcb before passing it into ip_pcbopts() in order to prevent
  simulatenous reads and read-modify-writes that could result in races.
- Pass the inpcb reference into ip_pcbopts() instead of the option chain
  pointer in the inpcb.
- Assert the inpcb lock in ip_pcbots.
- Convert one or two uses of a pointer as a boolean or an integer
  comparison to a comparison with NULL for readability.
2004-12-05 19:11:09 +00:00
glebius
4f260d49bc - Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
  is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]

Noticed by:	Roman Palagin [1]
Requested by:	Yuri Y. Bushmelev [2]
MFC after:	1 week
2004-12-05 14:30:38 +00:00
rwatson
7679ddf408 Correct a misspelling in a comment. 2004-12-05 13:28:52 +00:00
rwatson
c39858036f Acquire socket receive buffer mutex before appending and then waking up
a receive socket in DDP.  This reduces the number of mutex operations
required to deliver to a socket by two, and is the model used in other
protocols.
2004-12-05 13:27:30 +00:00
dhartmei
de7cd2f92a IPv6 packets can contain headers (like options) before the TCP/UDP/ICMP6
header. pf finds the first TCP/UDP/ICMP6 header to filter by traversing
the header chain. In the case where headers are skipped, the protocol
checksum verification used the wrong length (included the skipped headers),
leading to incorrectly mismatching checksums. Such IPv6 packets with
headers were silently dropped.

Discovered by:	Bernhard Schmidt
MFC after:	1 week
2004-12-05 12:15:43 +00:00
imp
29f3f48407 Start to add GIANT_REQUIRED; macros in places where giant is required
and that I've verified things seem to basically work.  I was able to
boot and hot plug usb devices.  Please let me know if this causes
problems for anybody.

The push down of giant has proceeded to the point that this will start
to matter more and more.
2004-12-05 07:55:30 +00:00
marcel
b898758464 o Don't limit GPT as a rank 2 provider. Allow it to be connected
anywhere in the DAG. This includes configurations that are not
   allowed by the EFI specification.
o  Reject a GPT partition table if it's not preceeded by a PMBR.
   There's no need to preserve the MBR partitioning anymore as GPT
   is mature and with the first bullet extending the applicability
   of GPT, it's better to be a bit more strict.
2004-12-05 06:02:21 +00:00
njl
c3df9439cf Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Found by:	iedowse
MFC after:	2 days
2004-12-05 01:35:18 +00:00
alc
dbfbcad51b Replace (inlined) pmap_pte() calls with smaller, faster code where
possible, such as the inner loop of pmap_copy().

Remove two comments that apply to i386 but not amd64.
2004-12-04 22:02:31 +00:00
pjd
ca88614a1e When initializing device, set d_softc and d_no fields for all components,
because we know it then and we need it when inserting a component which
wasn't destroyed while device was running.

Reported by:	Michael Handler <handler@grendel.net>
MFC after:	1 week
2004-12-04 21:20:59 +00:00
marius
1f07555c9d Revert rev. 1.166 and remove sparc64/pci/ofw_pci_if.m from MFILES again,
sparc64/pci/ofw_pci.h is no longer required for compiling modules.
2004-12-04 14:20:56 +00:00
phk
c47c85d39e Remove #if 0'ed rootfs mounting code. 2004-12-04 09:58:20 +00:00
phk
3bb4ccf412 Remove embryonic rootfs mounting facility.
In the near future rootfs mounting will not require special handling
in the filesystems.
2004-12-04 09:57:38 +00:00
brooks
ca26eca762 kmod.mk knows how to create empty opt_*.h files so let it deal with the
NOINET6 case.

Reported by:	ru
2004-12-03 23:43:02 +00:00
phk
7a77ca68a3 Implement a function, mount_arg() for accumulating a list of mount parameters
to nmount.

Make kernel_mount() accept the output from mount_arg() and know how to
free the malloc'ed space.

Make kernel_vmount() use the new function.
2004-12-03 22:38:06 +00:00
phk
8bc17baa39 Sort and wash #includes. 2004-12-03 21:29:25 +00:00
phk
81de6df0c1 When omount() is called, check if the filesystem have a cmount method
and if so call it.

The cmount method will gather and interpret omount() style arguments,
and issue a kern_[v]mount() call to execute the corresponding nmount
operation.
2004-12-03 21:14:46 +00:00
phk
a3935187b0 typo in comment. 2004-12-03 20:36:55 +00:00
phk
3c01ff1abb Add vfs_cmount() method to vfs_ops, this is to convert old-style mount
args to nmount request.
2004-12-03 19:33:19 +00:00
phk
81f68b35d9 Add early checks for MNT_ROOTFS since we need to allow it later on in
the code path.
2004-12-03 19:25:44 +00:00
phk
05e3a601c2 Retire unused vfs_mount() function in the name of nmount migration. 2004-12-03 18:40:58 +00:00
mdodd
5f1d43e2ed - Simplify pcn_probe() by moving vendor/device matching code to pcn_match().
- Avoid LOR in pcn_probe() by removing useless mutex stuff.
2004-12-03 18:35:00 +00:00
mdodd
aa6945f506 - Move chip ID code into separate function.
- Initialize sc->pcn_type during ATTACH as softc contents may not surivive
  from PROBE.
- Print out chip-id to assist with ongoing pcn(4) debugging efforts.
2004-12-03 18:21:30 +00:00
phk
b0e48f2258 Do not blindly pass linux filesystem specific mount data across. 2004-12-03 18:14:22 +00:00
rik
0dc1d96706 Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.

MFC: after 3 days.
2004-12-03 16:57:15 +00:00
mdodd
03bb845633 Additional register definitions.
Obtained from:	 NetBSD
2004-12-03 16:45:11 +00:00
phk
0381adc1df Introduce vfs_byname_kld() which will try to load the filesystem
as a module if possible.

Use it so we don't have linker magic in the middle of the already
complex mount code.
2004-12-03 16:11:01 +00:00
phk
410936c3f9 Make NAMEI_DIAGNOSTIC compile again and add a stragic vprint() 2004-12-03 12:15:39 +00:00
phk
4b1a114436 Improve vprint() a little bit: break long lines, reduce indent and tell
if the VI_LOCK() is held.
2004-12-03 12:09:34 +00:00
phk
f004ee8cb0 Add missing vop_bypass (returning EOPNOTSUPP).
Tripped up:	marks
2004-12-03 08:56:30 +00:00
njl
d8d93368a0 ACPI is not on pc98 either.
Informed by:	nyan
2004-12-03 08:44:56 +00:00
njl
63e8d4f89a Non-x86 platforms cannot use the ACPI includes. This should be fixed but
for now, only include the headers for i386, amd64, or ia64.

Pointed out by:	grehan
2004-12-03 08:13:08 +00:00
njl
beb94b5a21 Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.  We used to implement this in local patches but
now that ACPI-CA has merged/re-implemented most of our fixes, they were
no longer needed and we just needed to turn this knob on.  Also, remove
an unnecessary cast.

Tested by:	phk
2004-12-03 08:01:09 +00:00
cognet
df8773eb4e Include <sys/signalvar.h> for trapsignal(). 2004-12-02 23:31:48 +00:00
mlaier
55253712b9 Am I smoking crack? Correct stupid, wrong ASSERT -> if conversion and make
it do what I had in mind.

Noticed by:	glebius
Pointyhat to:	me, myself and mlaier
2004-12-02 15:47:15 +00:00