Commit Graph

4574 Commits

Author SHA1 Message Date
uwe 7494d34448 Tell config to generate fs_ffs.h as vfs_bio.c checks for defined(FFS).
Include that header in vfs_bio.c so that bioops are not redefined.
2006-04-05 00:52:16 +00:00
yamt c61cfbc7ca pool_grow: don't increase pr_minpages. (fix a mistake in 1.113) 2006-04-02 13:25:34 +00:00
dsl 114adc27fb call extent_free_region_descriptor(ex, myrp) when ltseep() returns non-zero
(eg if interrupted).
Fixes Coverty CIDs 1555 and 1556.
2006-04-02 09:27:05 +00:00
dsl c89fb86a25 Bail out of sysctl_create() if we fail to malloc() own.
free(own) when we bail out if any later malloc() calls fail.
Fixes coverty CID 2310
2006-04-02 09:07:57 +00:00
dsl 49b6576d34 Predicate all the tests against existing children with a single 'if (node)'.
Simplify the test that ensures a CTLFLAG_ANYNUMBER child is an only child.
Will stop the coverty CID 1082 report.
2006-04-02 08:04:05 +00:00
christos 46c0b8e98a PR/26804: Jason Thorpe: Make PT_DUMPCORE require the process to be PT_ATTACH'ed
first so that it is stopped and there are no races.
2006-04-01 22:34:00 +00:00
christos dfabd062ab PR/32809: Pavel Cahyna: Conflicting flags in l_flag and p_flag are causing
ps(1) to print incorrect information. Annotate the flags in the header files
to make sure that flags are not being re-used and move flags so that there
are no conflicts.
2006-04-01 00:57:34 +00:00
erh 76d8aa2c53 Fix call to simple_lock_assert_held() so builds with -DDEBUG work. 2006-03-31 06:01:07 +00:00
elad 42eb9126e2 Remove useless whitepsace.
This commit is dedicated to Dan Langille.
2006-03-30 17:40:58 +00:00
chs 60b21d1590 use uvm_km_alloc() instead of uvm_map(). 2006-03-30 04:05:05 +00:00
cube 699fe710fb Rework the _lwp* and sa_* families of syscalls so some details can be
handled differently depending on the emulation.  This paves the way for
COMPAT_NETBSD32 support of our pthread system.
2006-03-29 23:02:31 +00:00
thorpej a48de83500 Fix typo. 2006-03-29 06:25:35 +00:00
thorpej 35947a37ad Add a device_private() to return the driver's private data (softc).
For now, this just returns the passed device_t (as a void *) because
device softcs currently contain a "struct device" as the first member.
2006-03-29 06:08:16 +00:00
thorpej 78ffd948be Replace device_locators() with device_locator(), and use it. 2006-03-29 06:00:46 +00:00
thorpej 39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
martin d6d75eaf5d KASSERT that the returned file id length from VPTOFH is <= the
maximum allowed value (_VFS_MAXFIDSZ).
2006-03-27 20:20:45 +00:00
erh e4412d2162 Add simple_lock_assert_locked/simple_lock_assert_unlocked to provide additional
useful information when panic'ing because the assertion fails.
Use these to define the SCHED_ASSERT_LOCKED/SCHED_ASSERT_UNLOCKED macros.
2006-03-26 20:19:52 +00:00
erh 0cccd65efb When DIAGNOSTIC is defined, provide a kern.panic_now sysctl to conviniently
and reliably panic the system
2006-03-26 20:07:21 +00:00
hannken ce61e2843e vn_rdwr(): Initialize `mp' to NULL. vn_finished_write() would be called
with uninitialized `mp' if `vp->v_type == VCHR'.

From Coverity CID 2475.
2006-03-24 17:16:10 +00:00
christos ed99bb9996 Fix old pty name resolution for ptys > 256 2006-03-23 23:53:54 +00:00
matt ce8489309f There is no need to use MALLOC/FREE when rebuilding the execsw array
due to LKM loading/unloading.  This is not performance critical.
2006-03-22 01:14:46 +00:00
matt 3ae62e4c0b Get rid of stupid GCC fix. It was wrong. Spotted by Coverity. 2006-03-22 00:13:26 +00:00
yamt bd149b4812 m_copyback0:
- unify two copies of code to extend a chain.
- when extending a chain,
	- use trailing space of the last mbuf if any.
	- use mbuf cluster if appropriate.
2006-03-19 10:07:19 +00:00
yamt 3aa5cee09f m_print: fix the previous correctly. 2006-03-18 18:17:19 +00:00
chris 998afe8b1c Move check of strp for NULL to the top of the function, if it's NULL
release the lock and exit.

It could be argued that we only ever call the function with strp being
valid so the test isn't needed, but that requires the caller not to change,
or be altered/broken.

Fixes Coverity CID 2357, strp deferenced before NULL check.
2006-03-18 17:44:13 +00:00
chris 3b6dcb2526 Fix Coverity CID 1473: Static buffer overrun.
Add a counter for the number of pages, so that we print out the ext_pgs
values.
2006-03-18 17:37:17 +00:00
simonb 6c79cda5ae Coverity CID 2466 - Fix a GCC uninitialised variable warning in a way
that (hopefully!) keeps coverity happy too.
2006-03-18 07:27:50 +00:00
tls 2ebe53e4ac Add one more buffer pool, for 512-byte buffers. On the one hand, most
systems will never, ever need this -- because they use 8k/1k or even,
these days, 16k/2k or 32k/4k filesystems.  On the other hand, when you
do need this, you *really* need it: on anoncvs.netbsd.org, for instance,
where /tmp is 4k/512 and the filesystem contains tens or even hundreds
of thousands of single-frag directories, this essentially doubles the
efficiency of the allocator.  Since the overhead of keeping one extra
pool around is minimal, just add it by default.
2006-03-17 23:43:37 +00:00
christos 5a57baa413 don't use MALLOC with a non-constant size; use malloc instead. 2006-03-17 23:29:07 +00:00
skrll 75eb73218c KNF 2006-03-17 11:03:07 +00:00
yamt 848da92913 make duplicated code fragments into a function, pool_grow. 2006-03-17 10:09:25 +00:00
erh 8e641f354a Found by coverity issue 887. Check for NULL before using base_ph so
an interpreter that does not have PT_LOAD in the program header doesn't
crash the system.
2006-03-17 08:51:35 +00:00
chris caebf8211b Move check for rnode being NULL to before it's first use.
Fixes Coverity CID 2434
2006-03-17 01:52:08 +00:00
erh 762add7da1 Check db_onpanic before dropping into the debugger on lock errors. 2006-03-16 00:52:32 +00:00
drochner 94c70b92a9 Check the "oldlen" argument to sysctl(2) before passing it
to vslock(9). This prevents a local DOS.
(The checks against system and user limits for wired
memory should be centralized in UVM; for now prefer a less
invasive fix which can be pulled pulled up into releases.)
2006-03-15 16:12:07 +00:00
yamt 0c8e5d8d8f whitespace. 2006-03-15 11:10:41 +00:00
yamt 2ff5a7c85c m_copyback0: add comments and assertions. 2006-03-15 10:40:30 +00:00
yamt 7935de6ea7 use UIO_SETUP_SYSSPACE instead of using vmspace_kernel() directly. 2006-03-13 08:52:07 +00:00
yamt 0969bf3261 copyin_vmspace, copyout_vmspace: set uio_vmspace correctly.
from Christos Zoulas.
2006-03-13 03:17:47 +00:00
cube 209be910b7 Support the generation of coredumps for 32-bits binaries under
COMPAT_NETBSD32.  They haven't worked for 5 years.

Silently agreed by the tech-kern readers.

XXX sparc64 MD glue still lacking.
XXX The FPU registers on i386 are not dumped correctly, according to my
XXX tests.  It shouldn't be much work for someone who has the slightest
XXX idea of how that stuff is supposed to be laid out on i386.
2006-03-12 20:25:25 +00:00
christos 40a6c72b1d KNF: brace and parenthesis usage 2006-03-12 18:36:58 +00:00
yamt 6c02fe74a4 proc_vmspace_getref: treat curproc specially to fix coredump problem pointed
by Christos Zoulas.
2006-03-12 10:32:47 +00:00
yamt 33f0a013e3 fix copyout_proc after yamt-uio_vmspace merge. from Christos Zoulas. 2006-03-12 09:47:08 +00:00
yamt a5fe09f2de remove a wrong assertion. 2006-03-10 11:07:01 +00:00
thorpej b0275539fe Make extent_alloc_subregion(), extent_alloc(), and extent_alloc1() real
functions, not CPP macros.
2006-03-08 04:43:00 +00:00
pooka 1279f1b037 remove the no longer useful fdavail(), as proposed and (thankfully) not
discussed on tech-kern
2006-03-07 17:13:53 +00:00
thorpej 61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej a2b6f1b10c Wrap calls to (*e_syscall_intern)() in __HAVE_SYSCALL_INTERN. Fixes
VAX build.
2006-03-07 07:19:44 +00:00
thorpej be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
matt 044257a109 Add a diagnostic printf if a write fails during a coredump. 2006-03-06 21:53:29 +00:00