Commit Graph

35629 Commits

Author SHA1 Message Date
Poul-Henning Kamp
7c61d7858c Plug a memory-leak.
"I think you're right" by:	jake
2002-10-15 18:58:38 +00:00
Poul-Henning Kamp
9736c8f03a Use ; not , as statement separator in PDEBUG() macro.
Ignoring a NULL dev in device_set_ivars() sounds wrong, KASSERT it to
non-NULL instead.

Do the same for device_get_ivars() for reasons of symmetry, though
it probably would have yielded a panic anyway, this gives more precise
diagnostics.

Absentmindedly nodded OK to by:	jhb
2002-10-15 18:56:13 +00:00
Poul-Henning Kamp
65a728a53b Plug an infrequent (I think) memory leak.
Spotted by:	FlexeLint
2002-10-15 18:51:02 +00:00
Poul-Henning Kamp
220aecb807 Constification ? Yes, out that door, row on the left, one patch each.
Sponsored by:	DARPA & NAI Labs
2002-10-15 18:21:53 +00:00
John Baldwin
7fd1f2b8bc Argh. Put back setting of P_ADVLOCK for the F_WRLCK case that was
accidentally lost in the previous revision.

Submitted by:	bde
Pointy hat to:	jhb
2002-10-15 18:10:13 +00:00
Marcel Moolenaar
47f750125b Fix kernel module loading on ia64. Cross-module function calls
were improperly relocated due to faulty logic in lookup_fdesc()
in elf_machdep.c. The symbol index (symidx) was bogusly used for
load modules other than the one the relocation applied to. This
resulted in bogus bindings and consequently runtime failures.

The fix is to use the symbol index only for the module being
relocated and to use the symbol name for look-ups in the
modules in the dependent list. As such, we need a function to
return the symbol name given the linker file and symbol index.
2002-10-15 05:40:07 +00:00
Matt Jacob
64fa510881 Enable mpt && ISP_TARGET_MODE in isp (for Lint purposes) 2002-10-15 04:38:40 +00:00
Marcel Moolenaar
18e0cd7dde Fix previous commit: Don't cast integral types to pointers to
print them with %p. Cast to unsigned long and print with %#lx.

Discussed with: bde
2002-10-15 01:50:09 +00:00
Peter Wemm
803cc8aa8f Restore pointer that was removed in 1.128. This wasn't a merge-o. 2002-10-15 01:36:45 +00:00
Mike Barcroft
89b6abc39a Move details of key_t to <sys/_types.h>, so that it can be typedef'd
in more than just <sys/types.h>.
2002-10-15 00:40:52 +00:00
John Baldwin
c65440644e - Add a new global mutex 'ppeers_lock' to protect the p_peers list of
processes forked with RFTHREAD.
- Use a goto to a label for common code when exiting from fork1() in case
  of an error.
- Move the RFTHREAD linkage setup code later in fork since the ppeers_lock
  cannot be locked while holding a proc lock.  Handle the race of a task
  leader exiting and killing its peers while a peer is forking a new child.
  In that case, go ahead and let the peer process proceed normally as the
  parent is about to kill it.  However, the task leader may have already
  gone to sleep to wait for the peers to die, so the new child process may
  not receive a SIGKILL from the task leader.  Rather than try to destruct
  the new child process, just go ahead and send it a SIGKILL directly and
  add it to the p_peers list.  This ensures that the task leader will wait
  until both the peer process doing the fork() and the new child process
  have received their KILL signals and exited.

Discussed with:	truckman (earlier versions)
2002-10-15 00:14:32 +00:00
John Baldwin
60a6965a88 Remove the leaderp variable and just access p_leader directly. The
p_leader field is not protected by the proc lock but is only set during
fork1() by the parent process and never changes.
2002-10-15 00:03:40 +00:00
John Baldwin
63e30378bc - Use __BUS_ACCESSOR() to define the ISA ivar accessor functions instead of
homerolling our own version.
- Rename the enum for memsize from ISA_IVAR_MSIZE to ISA_IVAR_MEMSIZE
  since using 'MSIZE' in the macro invocation of ISA_ACCESSOR() conflicts
  with the 'MSIZE' kernel option.  The accessor function is still
  isa_get_msize().
2002-10-15 00:02:51 +00:00
Peter Wemm
af3f249f3a The a.out md_coredump stuff isn't referenced anywhere anymore, and
hasn't been filled in for ages..  Nuked.
2002-10-15 00:02:50 +00:00
Peter Wemm
962deac027 Turn off the premature locking in xl. The driver tries to use the mutexes
as spl replacements, but you cant sleep while holding mutexes.

This change has been made on many other drivers.
2002-10-14 23:58:46 +00:00
Kirk McKusick
48f0495d85 When reading or writing the extended attributes of a special device
or fifo in UFS2, the normal ufs_strategy routine needs to be used
rather than the spec_strategy or fifo_strategy routine. Thus the
ffsext_strategy routine is interposed in the ffs_vnops vectors for
special devices and fifo's to pick off this special case. Otherwise
it simply falls through to the usual spec_strategy or fifo_strategy
routine.

Submitted by:	Robert Watson <rwatson@FreeBSD.org>
Sponsored by:	DARPA & NAI Labs.
2002-10-14 23:18:09 +00:00
Alfred Perlstein
9c1c2e9924 Put function return types on a line by themselves.
Cleanup my earlier de-__P sweep and remove whitespace between function
names and paramters.
2002-10-14 22:31:52 +00:00
Matt Jacob
413f5a8add LINT related fixes (as noticed by bde) 2002-10-14 22:13:51 +00:00
Poul-Henning Kamp
b775674772 Remove a bogus local variable.
Sponsored by:	DARPA & NAI Labs.
2002-10-14 21:22:23 +00:00
Alfred Perlstein
8ced1eb281 Remove a KASSERT I added in 1.73 to catch uninitialized pipes.
It must be removed because it is done without the pipe being locked
via pipelock() and therefore is vulnerable to races with pipespace()
erroneously triggering it by temporarily zero'ing out the structure
backing the pipe.

It looks as if this assertion is not needed because all manipulation
of the data changed by pipespace() _is_ protected by pipelock().

Reported by: kris, mckusick
2002-10-14 21:15:04 +00:00
Mike Barcroft
b8a5a77b10 o Add typedefs for gid_t, key_t, mode_t, and uid_t.
o Add comment about ipc_perm's members.
o Add some visibility conditionals for non-standard extentions.
o Remove a comment about ftok() not belonging.
2002-10-14 20:50:41 +00:00
Julian Elischer
24c5baae53 Did you ever notice how stupid bugs show up much clearer
when you see them in a commit message?
2002-10-14 20:43:02 +00:00
Julian Elischer
1f955e2d48 Tidy up the scheduler's code for changing the priority of a thread.
Logically pretty much a NOP.
2002-10-14 20:34:31 +00:00
Julian Elischer
d524d69b16 Remove old useless debugging code 2002-10-14 20:31:54 +00:00
Jake Burkholder
60e0e42e3c Moved geom class initialization to SI_SUB_DRIVERS from SI_SUB_PSEUDO.
This fixes mounting root from md(4) which calls disk_create() early.
2002-10-14 20:20:17 +00:00
Robert Watson
baeb8a4774 Fix two memory leaks in error conditions involving the UFS ACL code:
if failures occur, make sure that we release both the default ACL
and access ACL storage during new object creation.

Spotted by:	phk and his pet flexelint
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-14 19:55:49 +00:00
Kirk McKusick
a6b9f47b31 When scanning the freelist looking for candidate vnodes to recycle,
be sure to exit the loop with vp == NULL if no candidates are found.
Formerly, this bug would cause the last vnode inspected to be used,
even if it was not available. The result was a panic "vn_finished_write:
neg cnt".

Sponsored by:	DARPA & NAI Labs.
2002-10-14 19:54:39 +00:00
Kirk McKusick
e04a020067 Unconditionally reset vp->v_vnlock back to the default in the
vclean() function (e.g., vp->v_vnlock = &vp->v_lock) rather
than requiring filesystems that use alternate locks to do so
in their vop_reclaim functions. This change is a further cleanup
of the vop_stdlock interface.

Submitted by:	Poul-Henning Kamp <phk@critter.freebsd.dk>
Sponsored by:	DARPA & NAI Labs.
2002-10-14 19:44:51 +00:00
Jim Pirzyk
77e8341280 Add a knob to turn on and off the CMPXCHG instruction on > i386 IA32 systems.
This is most beneficial for vmware client os installs.

Reviewed by: jmallet, iedowse, tlambert2@mindspring.com
MFC After: never, -STABLE does not currently use this instruction
2002-10-14 19:33:12 +00:00
John Baldwin
bb2ea9c27d Allow firewire, sbp (SCSI over firewire), and fwe (non-standard raw
ethernet over firewire) to be statically compiled into the kernel as
devices.
2002-10-14 19:21:44 +00:00
John Baldwin
24b7381388 - Remove unused opt_foo.h headers.
- Don't mess with CFLAGS.
- Fix description of fwe module Makefile.
2002-10-14 19:18:30 +00:00
John Baldwin
83a20b6e3e This file doesn't need opt_bus.h. 2002-10-14 19:11:19 +00:00
Robert Watson
a16a92afdb Define MNT_ACLS, which can report on the status of the FS_ACLS flag
used by UFS to administratively enable support for extended ACLs.

While I'm here, remove MNT_MULTILABEL from the list of file system
flags we permit to be updated after the initial mount.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-14 17:18:27 +00:00
Robert Watson
3ceef565b2 Define two new superblock file system flags:
FS_ACLS		Administrative enable/disable of extended ACL support
FS_MULTILABEL	Administrative flag to indicate to the MAC Framework
		that objects in the file system are individually
		labeled using extended attributes.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
Reviewed by:	(in principal) mckusick, phk
2002-10-14 17:07:11 +00:00
Mike Barcroft
a1facc57c0 style(9)
Submitted by: bde (partially)
2002-10-14 14:28:46 +00:00
Poul-Henning Kamp
64b023f4bd Populate more fields of the disklabel for PC98.
Submitted by:	Kawanobe Koh <kawanobe@st.rim.or.jp>
2002-10-14 14:22:29 +00:00
Mike Barcroft
5f0aea5ca5 1) Although C99 allows implementations to define additional SIG*
constants in scope, C90 does not; so, add namespace visibility
   conditionals to SIG*.
2) Define the extended __sighandler_t type only in BSD namespace.
3) Don't forward declare a struct for a prototype in <signal.h>.
4) Move location of SIG_* constants.
5) Move a forward declare into the correct namespace conditional.

Requested by:	bde (1)
Submitted by:	bde (2 thru 5)
2002-10-14 14:12:16 +00:00
Yoshihiro Takahashi
f974f604ef MFi386: revision 1.9. 2002-10-14 12:07:39 +00:00
Olivier Houchard
89ca562efb Fix support for the ALi M5451 (rev 0.2) chip.
Reviewed by:	orion, mux
Approved by:	mux (mentor)
MFC after:	1 week
2002-10-14 11:47:37 +00:00
Poul-Henning Kamp
27da100965 Don't panic when we can just return an error code. 2002-10-14 11:21:05 +00:00
Yoshihiro Takahashi
0921c98b22 The ep and pccard modules build on pc98. 2002-10-14 10:15:01 +00:00
Yoshihiro Takahashi
96d818fda7 Merged from sys/dev/sio/sio.c revision 1.382. 2002-10-14 10:10:09 +00:00
Poul-Henning Kamp
6b4abfd6eb Implement the GEOMCONFIGGEOM ioctl which can be used to manually create
and configure an instance of a class on a give provider.

Sponsored by:	DARPA & NAI Labs
2002-10-14 10:05:23 +00:00
Poul-Henning Kamp
d0e17c1b91 Add more KASSERTS.
Sponsored by:	DARPA & NAI Labs.
2002-10-14 10:02:24 +00:00
Marcel Moolenaar
df8b64f634 Allow kernel dumps to be aborted with ctrl-C. 2002-10-14 05:38:22 +00:00
Crist J. Clark
232a880278 Unconditionally restore the pointer to the saved Ethernet header after
going to bridge.c:bdg_forward(). The header can be munged even if the
mbuf does not /appear/ to change.

PR:		kern/42465
MFC after:	4 days
2002-10-14 05:27:00 +00:00
Kirk McKusick
a5b65058d5 Regularize the vop_stdlock'ing protocol across all the filesystems
that use it. Specifically, vop_stdlock uses the lock pointed to by
vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to
reference vp->v_lock. Filesystems that wish to use the default
do not need to allocate a lock at the front of their node structure
(as some still did) or do a lockinit. They can simply start using
vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks,
but still use the vop_stdlock functions (such as nullfs) can simply
replace vp->v_vnlock with a pointer to the lock that they wish to
have used for the vnode. Such filesystems are responsible for
setting the vp->v_vnlock back to the default in their vop_reclaim
routine (e.g., vp->v_vnlock = &vp->v_lock).

In theory, this set of changes cleans up the existing filesystem
lock interface and should have no function change to the existing
locking scheme.

Sponsored by:	DARPA & NAI Labs.
2002-10-14 03:20:36 +00:00
Warner Losh
aa23e9c476 o Comment out the symbol download code for 4.x.
o Add hooks for doing power management of the output signal.
o Minor hacks to make flexlint happy wrt staticness of functions.
2002-10-14 01:59:57 +00:00
Alan Cox
4d752b01b4 Eliminate the unnecessary clearing of flag bits that are already clear
in lio_listio(2).
2002-10-14 01:21:37 +00:00
Poul-Henning Kamp
527a2a792f Add in the GEOM control module.
Sponsored by:	DARPA & NAI Labs.
2002-10-13 20:36:47 +00:00