Commit Graph

99216 Commits

Author SHA1 Message Date
Poul-Henning Kamp
3aa5a3ad90 We don't need to hold Giant to create the worker kthread. 2004-02-07 23:01:17 +00:00
Poul-Henning Kamp
97d2ca7830 Fix the last and most important bit of the test case to test the same
binary as the rest of it.

Add MD5 check that the md(4) device gets set up correctly.
2004-02-07 22:58:39 +00:00
Bill Paul
5a57707840 Correct an intance of mtx_pool_lock() that should have been mtx_pool_unlock(). 2004-02-07 22:19:20 +00:00
Scott Long
8b60cc16ab Remove the use of AACQ_COMPLETE here since there is no longer a completion
queue.
2004-02-07 20:54:29 +00:00
Poul-Henning Kamp
36095f4a2b I guess nobody has needed to use the SVR4olator to create device
nodes, or if they did, they're now locked away on the Kurt Gdel
memorial home for the numerically confused:

Don't cast a kernel pointer (from makedev(9)) to an integer (maj+minor combo).
2004-02-07 18:54:34 +00:00
Scott Long
ecd1c51f92 Do some small cleanups to comments and remove AACQ_COMPLETE definitions since
the completion queue is long-gone.
2004-02-07 17:40:38 +00:00
Ruslan Ermilov
0952f7e09f Convert to plain bsd.prog.mk makefile.
Reviewed by:	scottl
2004-02-07 16:58:23 +00:00
Ruslan Ermilov
63cf1d7ac8 Update for the 2003/07/31 import. 2004-02-07 16:46:05 +00:00
Warner Losh
a88ffc6f99 ttys is gone, kill it here too 2004-02-07 15:46:20 +00:00
Yaroslav Tykhiy
385f9bf07c NULL looks better than (char *)0 unless we're passing
an unprototyped argument to a function.
2004-02-07 14:59:11 +00:00
Yaroslav Tykhiy
b943b3c4ae Deny attempts to rename a file from guest users if the policy
says they may not modify existing files through FTP.

Renaming a file is effectively a way to modify it.
For instance, if a malicious party is unable to delete or overwrite
a sensitive file, they can nevertheless rename it to a hidden name
and then upload a troyan horse under the guise of the old file name.
2004-02-07 14:54:30 +00:00
Yaroslav Tykhiy
3f8b9cfe85 perror_reply() should not be used where errno isn't meaningful. 2004-02-07 14:38:04 +00:00
Ruslan Ermilov
6ed6b4ab71 MFi386: Removed -elf and duplicate -ffreestanding. 2004-02-07 14:35:33 +00:00
Ruslan Ermilov
e215fffac2 - Removed -elf which is not a valid gcc(1) option anymore.
- Removed -ffreestanding; it's enforced by ../Makefile.inc.
2004-02-07 14:32:06 +00:00
Yaroslav Tykhiy
10e8910499 Work around a bug in some clients by never returning raw directory
contents in reply to a RETR command.  Such clients consider RETR
as a way to tell a file from a directory.  Mozilla is an example.

PR:		bin/62232
Submitted by:	Bob Finch <bob+freebsd <at> nas <dot> com>
MFC after:	1 week
2004-02-07 14:11:38 +00:00
Ruslan Ermilov
600f8a8d39 Generate .depend file. 2004-02-07 13:38:47 +00:00
Yoshihiro Takahashi
cc78dccee9 MFi386: Cleanups to sys/boot makefiles. 2004-02-07 12:19:44 +00:00
Ruslan Ermilov
50a51e39a9 Unbreak world. 2004-02-07 11:13:47 +00:00
Ruslan Ermilov
079cbb98ac Style: use the defined() expression explicitly. 2004-02-07 11:05:10 +00:00
Scott Long
d85f27ce7f Remove the hack of lowering AAC_MAX_FIB now that the root cause of the
problem was found.
2004-02-07 10:30:59 +00:00
Scott Long
4102d44b77 If a command has to be deferred because there are no more resources for it
on the card, unmap it first.  This allows it to be picked up properly when
the queue gets kicked again.  This was the root problem for the lost command
(i.e. stuck in getblk/vinvalb) problem.  While here, panic if commands don't
map correctly instead of just silently ignoring the problem and dropping
command.  Also slow down the dynamic allocation of new commands.

It should be safe to go back into the aac waters.  Thanks to everyone who
suffered through this and provided good feedback.
2004-02-07 10:30:22 +00:00
Alan Cox
c5aebf380c swp_pager_async_iodone() no longer requires Giant. Modify bufdone()
and swapgeom_done() to perform swp_pager_async_iodone() without Giant.

Reviewed by:	tegge
2004-02-07 08:54:50 +00:00
Ruslan Ermilov
9ee9ecea00 Use the default threading library if requested.
Reviewed by:	des, deischen
2004-02-07 08:23:48 +00:00
Ruslan Ermilov
7e39a38ec9 Untangle building of AMD64 boot code.
Tested on:	amd64 (sledge)
2004-02-07 08:10:07 +00:00
Diomidis Spinellis
a54c3906ad getnetbyname fixes:
Do not choke on malformed network addresses.
Return n_name in static space, not on the function's stack.

MFC after: 1 week
2004-02-07 07:30:02 +00:00
Mike Makonnen
b7b1e150b0 Add an entry about the removal of etc/rc.d/ttys. 2004-02-07 07:25:47 +00:00
Ruslan Ermilov
b08f1446e3 - Demangle usage().
- Require the "directory" argument with the -d option.
2004-02-07 07:22:11 +00:00
Mike Makonnen
a8811e9d1d Now that devfs is mandatory, there is no need to muck around
with tty/pty permissions.

Noticed by:	brooks
OKed:		phk
2004-02-07 07:10:25 +00:00
Bill Paul
9ec5585585 Add a whole bunch of new stuff to make the driver for the AMD Am1771/Am1772
802.11b chipset work. This chip is present on the SMC2602W version 3
NIC, which is what was used for testing. This driver creates kernel
threads (12 of them!) for various purposes, and required the following
routines:

PsCreateSystemThread()
PsTerminateSystemThread()
KeInitializeEvent()
KeSetEvent()
KeResetEvent()
KeInitializeMutex()
KeReleaseMutex()
KeWaitForSingleObject()
KeWaitForMultipleObjects()
IoGetDeviceProperty()

and several more. Also, this driver abuses the fact that NDIS events
and timers are actually Windows events and timers, and uses NDIS events
with KeWaitForSingleObject(). The NDIS event routines have been rewritten
to interface with the ntoskrnl module. Many routines with incorrect
prototypes have been cleaned up.

Also, this driver puts jobs on the NDIS taskqueue (via NdisScheduleWorkItem())
which block on events, and this interferes with the operation of
NdisMAllocateSharedMemoryAsync(), which was also being put on the
NDIS taskqueue. To avoid the deadlock, NdisMAllocateSharedMemoryAsync()
is now performed in the NDIS SWI thread instead.

There's still room for some cleanups here, and I really should implement
KeInitializeTimer() and friends.
2004-02-07 06:44:13 +00:00
Scott Long
1e6466b61e Add a simple tool for checking the queue stats in the aac(4) driver. The
ioctl interface for this has been here for years, so it might as well get
used.
2004-02-07 03:51:20 +00:00
Matt Jacob
746e9c8540 Checkpoint of work in progress in cleaning up target mode. It actually
seems to work well in RELENG_4. However, 5.X locking foo means that I'll
have to do some quick redesign.

Add ioctl handlers for ISP_GETROLE and ISP_SETROLE ioctls.
2004-02-07 03:47:33 +00:00
Matt Jacob
2cd44270e5 add a count for inotifies as well as atios.
MFC after:	1 week
2004-02-07 03:44:43 +00:00
Matt Jacob
4e8a2b48a7 Reverse role defines for initiator and target mode to better match the
class 3 service parameters we'd get.

Steal 8 bits out of the portid u_int32_t for role information (port ids
are 24 bits anyway).

MFC after:	1 week
2004-02-07 03:43:27 +00:00
Matt Jacob
cc330eadff Add case to handle ISPCTL_GET_PDB.
MFC after:	1 week
2004-02-07 03:42:17 +00:00
Matt Jacob
87ab7d39a4 If we're defined to have a default role for target mode, make it
just ISP_ROLE_TARGET- not both.

MFC after:	1 week
2004-02-07 03:39:42 +00:00
Matt Jacob
e0d3cfb7be Change role defines so that they better match class 3 service parameters.
Add ISPCTL_GET_PDB isp_control operation.

MFC after:	1 week
2004-02-07 03:38:39 +00:00
Scott Long
8f6a5435e7 Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in the
handling of resources shortages.  The driver is now so fast that it can
completely fill all 512 slots on the card, but for some reason only 511
slots are being allocated.  Anything that tries to go into the 512th
slot gets silently lost.   Both bugs need to be fixed at a later date,
but this should fix the reports of hangs in getblk and vinvalb.
2004-02-07 03:30:32 +00:00
Scott Long
a32a982d4a - Broaden the scope of locking in aac_command_thread() again to catch some
edge cases in the loop.

- Try to grab a command before dequeueing the bio from the bioq.  The old
  behaviour of requeuing deferred bios to the end of the bioq is arguably
  wrong.  This should be fixed in the future to check the bioq head without
  automatically dequeueing the bio.
2004-02-07 03:26:38 +00:00
Scott Long
9768efef88 Add an #ifdef _KERNEL so that this file can be used from userland. 2004-02-07 03:20:07 +00:00
Jimmy Olgeni
d97ec53412 The "bin" distribution was renamed to "base" in CURRENT. 2004-02-07 00:34:11 +00:00
Pawel Jakub Dawidek
12047230cd Allow decreasing access count even if there is no disk anymore.
This will allow closing disks that were removed while opened.

Approved by:	phk, scottl (mentor)
2004-02-06 23:10:49 +00:00
Lukas Ertl
5b2f81ec4b Fix memory leak.
PR:            kern/58634
Submitted by:  le
Approved by:   phk
2004-02-06 22:51:04 +00:00
Ruslan Ermilov
a4a62f5d1f First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.

Tested on:	i386, amd64
Prodded by:	bde
2004-02-06 21:58:32 +00:00
Bruce A. Mah
cb4cb93f58 New release note: SA-04:02. 2004-02-06 21:36:48 +00:00
Lukas Ertl
3ea53122d5 Correct order of arguments given to checkparity and rebuildparity.
Approved by: joerg (mentor)
2004-02-06 21:07:17 +00:00
Lukas Ertl
82d4902dc0 Correct typo. 2004-02-06 21:05:42 +00:00
Peter Wemm
4e37bb8f5d Reduce the inline limit from 20000 to 8000 after the previous changes
to simplify the curthread expansion some months ago.
2004-02-06 20:40:04 +00:00
Peter Wemm
5162123068 Remove the badsw* INVARIANTS checks. The events that this attempts
to catch are already nicely caught by trapping the null pointer derefs.
Remove no-longer-used noswitch/nothrow strings.  They were referenced
by the stub cpu_switch() etc functions before they were implemented.
Try something a little different for the lock prefixes.

Prompted by:  bde (the first two items anyway)
2004-02-06 20:38:39 +00:00
John Baldwin
28596eb0ea Regen. 2004-02-06 20:21:18 +00:00
John Baldwin
44c99fac14 Sync up MP safe flags with global syscalls.master. This includes write(),
close(), getpid(), ibcs2_setuid(), getuid(), ptrace(), ibcs2_pause(),
ibcs2_nice(), ibcs2_kill(), ibcs2_pgrpsys(), dup(), pipe(), ibcs2_setgid(),
getgid(), umask(), and sigreturn().
2004-02-06 20:20:07 +00:00