]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoPrevent dereferencing a NULL route pointer when trying to update the
andre [Wed, 18 Jan 2006 15:05:05 +0000 (15:05 +0000)]
Prevent dereferencing a NULL route pointer when trying to update the
route MTU.

This bug is very difficult to reach and not remotely exploitable.

Found by: Coverity Prevent(tm)
Coverity ID: CID162
Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 days

18 years agoBe ready to a case when not a constant number of segments is returned
glebius [Wed, 18 Jan 2006 14:31:21 +0000 (14:31 +0000)]
Be ready to a case when not a constant number of segments is returned
by bus_dmamap_load_mbuf_sg() on jumbo buffer allocation.

Reviewed by: scottl, gallatin

18 years agoReturn mbuf pointer or NULL from ip_fastforward() as the mbuf pointer
andre [Wed, 18 Jan 2006 14:24:39 +0000 (14:24 +0000)]
Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer
may have changed by m_pullup() during fastforward processing.

While this is a bug it is actually never triggered in real world
situations and it is not remotely exploitable.

Found by: Coverity Prevent(tm)
Coverity ID: CID780
Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoCorrect two promise entries, these are only 2port SATA.
sos [Wed, 18 Jan 2006 13:34:28 +0000 (13:34 +0000)]
Correct two promise entries, these are only 2port SATA.

18 years agoWhitespace cleanup.
sos [Wed, 18 Jan 2006 13:10:17 +0000 (13:10 +0000)]
Whitespace cleanup.

18 years agoStyle cleanups.
pjd [Wed, 18 Jan 2006 11:03:20 +0000 (11:03 +0000)]
Style cleanups.

X-MFC-after: Already MFCed to RELENG_6 by accident.

18 years agoResolve the mount point's path with realpath(2) before checking if file
pjd [Wed, 18 Jan 2006 11:00:34 +0000 (11:00 +0000)]
Resolve the mount point's path with realpath(2) before checking if file
system is mounted. This prevevents duplicated mounts.

The change I made against the original patch is to fall back to the given
path on realpath(2) failure instead of exiting with an error.

Submitted by: Andreas Kohn <andreas@syndrom23.de>
PR: bin/89782
MFC after: 3 days

18 years agoProperly report SATA connection speed.
sos [Wed, 18 Jan 2006 10:02:23 +0000 (10:02 +0000)]
Properly report SATA connection speed.

18 years agoProperly print the SATA protocal version.
sos [Wed, 18 Jan 2006 10:01:43 +0000 (10:01 +0000)]
Properly print the SATA protocal version.

18 years agoCheck ifp before dereferencing it in xl_detach(). xl_detach() can be called
glebius [Wed, 18 Jan 2006 09:42:21 +0000 (09:42 +0000)]
Check ifp before dereferencing it in xl_detach(). xl_detach() can be called
from xl_attach(), when ifp is not defined yet.

Found with: Coverity Prevent(tm)

18 years agoAdd support for using DMA on dump, greatly speeds up the dump process.
sos [Wed, 18 Jan 2006 09:14:55 +0000 (09:14 +0000)]
Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.

18 years agoCorrect a buffer overflow when scanning for 802.11 wireless networks.
cperciva [Wed, 18 Jan 2006 09:03:15 +0000 (09:03 +0000)]
Correct a buffer overflow when scanning for 802.11 wireless networks.

Security: FreeBSD-SA-06:05.80211

18 years agoFix ioctl to not get swallowed by ioctl code (i.e., make sure the darned
mjacob [Wed, 18 Jan 2006 08:37:27 +0000 (08:37 +0000)]
Fix ioctl to not get swallowed by ioctl code (i.e., make sure the darned
code sticks within 8 bits)

MFC after: 1 week

18 years agoImproves and cleanups over inetd(8):
delphij [Wed, 18 Jan 2006 07:47:46 +0000 (07:47 +0000)]
Improves and cleanups over inetd(8):

 - Teach inetd(8) about kqueue, originally implemented by jmg@[1].
 - Use new C99 style function prototypes instead of K&Rs.
 - Raise WARNS from 2 to 6

Glanced at by: ru
MFC After: 2 weeks

[1] http://people.freebsd.org/~jmg/inetd.kq.patch,
    http://people.freebsd.org/~jmg/inetd.kq.html

18 years agoEliminate a stale instruction introduced in revision 1.136.
davidxu [Wed, 18 Jan 2006 06:42:42 +0000 (06:42 +0000)]
Eliminate a stale instruction introduced in revision 1.136.

18 years agoDisable "tp" support until I figure out why it's breaking the build. <sigh>
kientzle [Wed, 18 Jan 2006 06:26:42 +0000 (06:26 +0000)]
Disable "tp" support until I figure out why it's breaking the build. <sigh>

18 years agoBump date to Sept 20, the date of the last content change
imp [Wed, 18 Jan 2006 05:48:45 +0000 (05:48 +0000)]
Bump date to Sept 20, the date of the last content change

18 years agoTell nextboot to clean up after itself.
wes [Wed, 18 Jan 2006 04:53:48 +0000 (04:53 +0000)]
Tell nextboot to clean up after itself.

18 years agoRevert previous change, "getopts" (with an 's') is a builtin in
wes [Wed, 18 Jan 2006 04:48:45 +0000 (04:48 +0000)]
Revert previous change, "getopts" (with an 's') is a builtin in
/bin/sh.

18 years agoAdd a warning pointing out that incomplete ports trees are not
cperciva [Wed, 18 Jan 2006 03:40:57 +0000 (03:40 +0000)]
Add a warning pointing out that incomplete ports trees are not
supported and that users of REFUSE directives should update their
entire ports tree before asking for help on the mailing lists.

Requested by: kris
MFC after: 3 days

18 years agoo Add missing relocations.
marcel [Wed, 18 Jan 2006 01:45:57 +0000 (01:45 +0000)]
o  Add missing relocations.
o  Minor white-space fixups.

18 years agoRemove Giant / busdma_lock_mutex from busdma_tag_create().
ariff [Wed, 18 Jan 2006 01:01:37 +0000 (01:01 +0000)]
Remove Giant / busdma_lock_mutex from busdma_tag_create().

18 years ago - Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc)
oleg [Tue, 17 Jan 2006 23:01:58 +0000 (23:01 +0000)]
 - Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc)
   as input/output interface errors.
 - Keep values of rx/tx discards & tx collisions inside struct bge_softc.
   So we can keep statistic across ifconfig down/up runs (cause bringing
   bge up will reset chip).

Approved by: glebius (mentor)
MFC after: 1 week

18 years agos/R_IA64_/R_IA_64_/g as per the ia64 psABI.
marcel [Tue, 17 Jan 2006 21:03:22 +0000 (21:03 +0000)]
s/R_IA64_/R_IA_64_/g as per the ia64 psABI.

18 years agoSince p_cansee will end up dereferencing p_ucred, don't check for p_ucred
jmallett [Tue, 17 Jan 2006 20:25:01 +0000 (20:25 +0000)]
Since p_cansee will end up dereferencing p_ucred, don't check for p_ucred
equal to NULL several times later.  p_ucred "should probably not" be NULL
if the process isn't PRS_NEW anyway.  This is strongly reinforced by the fact
that we don't see frequent crashes here.  Remove the checks after p_cansee and
add a KASSERT right before it.

Found by: Coverity Prevent (tm)

Also trim one nearby trailing space.

18 years agoUse the .Fx macro.
simon [Tue, 17 Jan 2006 19:37:07 +0000 (19:37 +0000)]
Use the .Fx macro.

MFC after: 3 days

18 years agoRemove the module loading magic again; it's not needed after all.
philip [Tue, 17 Jan 2006 19:29:31 +0000 (19:29 +0000)]
Remove the module loading magic again; it's not needed after all.

Pointy hat to: matteo
Submitted by: matteo
Reviewed by: pjd
MFC after: 3 days

18 years agoI ran into an nfs client panic a couple of times in a row over the
alfred [Tue, 17 Jan 2006 17:29:03 +0000 (17:29 +0000)]
I ran into an nfs client panic a couple of times in a row over the
last few days.  I tracked it down to the fact that nfs_reclaim()
is setting vp->v_data to NULL _before_ calling vnode_destroy_object().
After silence from the mailing list I checked further and discovered
that ufs_reclaim() is unique among FreeBSD filesystems for calling
vnode_destroy_object() early, long before tossing v_data or much
of anything else, for that matter.  The rest, including NFS, appear
to be identical, as if they were just clones of one original routine.

The enclosed patch fixes all file systems in essentially the same
way, by moving the call to vnode_destroy_object() to early in the
routine (before the call to vfs_hash_remove(), if any).  I have
only tested NFS, but I've now run for over eighteen hours with the
patch where I wouldn't get past four or five without it.

Submitted by: Frank Mayhar
Requested by: Mohan Srinivasan
MFC After: 1 week

18 years agoFix a memory leak I introduced with the hostb/vgapci stuff.
jhb [Tue, 17 Jan 2006 17:02:45 +0000 (17:02 +0000)]
Fix a memory leak I introduced with the hostb/vgapci stuff.

Reported by: Coverity (via dfr's clue-bat)

18 years agoBah. Fix 'show lock' to actually be compiled in. I had just fixed this in
jhb [Tue, 17 Jan 2006 16:58:32 +0000 (16:58 +0000)]
Bah.  Fix 'show lock' to actually be compiled in.  I had just fixed this in
p4 but had an older subr_lock.c on the machine I committed to CVS from.

18 years agoAdd a new file (kern/subr_lock.c) for holding code related to struct
jhb [Tue, 17 Jan 2006 16:55:17 +0000 (16:55 +0000)]
Add a new file (kern/subr_lock.c) for holding code related to struct
lock_obj objects:
- Add new lock_init() and lock_destroy() functions to setup and teardown
  lock_object objects including KTR logging and registering with WITNESS.
- Move all the handling of LO_INITIALIZED out of witness and the various
  lock init functions into lock_init() and lock_destroy().
- Remove the constants for static indices into the lock_classes[] array
  and change the code outside of subr_lock.c to use LOCK_CLASS to compare
  against a known lock class.
- Move the 'show lock' ddb function and lock_classes[] array out of
  kern_mutex.c over to subr_lock.c.

18 years agoFix a memory leak.
jkoshy [Tue, 17 Jan 2006 16:53:50 +0000 (16:53 +0000)]
Fix a memory leak.

Found by: Coverity

18 years agoInitialize thread0.td_contested in init_turnstiles() rather than
jhb [Tue, 17 Jan 2006 16:47:42 +0000 (16:47 +0000)]
Initialize thread0.td_contested in init_turnstiles() rather than
mutex_init() as it is used by the turnstile code and is not mutex-specific.

18 years agoUpdate a stale comment.
jhb [Tue, 17 Jan 2006 16:44:34 +0000 (16:44 +0000)]
Update a stale comment.

18 years agoGarbage collect turnstile_empty() since it is unused.
jhb [Tue, 17 Jan 2006 16:40:20 +0000 (16:40 +0000)]
Garbage collect turnstile_empty() since it is unused.

18 years agoFix an 11 year old mistake: Let the hash functions take a void* instead
phk [Tue, 17 Jan 2006 15:35:57 +0000 (15:35 +0000)]
Fix an 11 year old mistake:  Let the hash functions take a void* instead
of unsigned char* argument.

18 years agoMove $FreeBSD$ from comment to __FBSDID().
pjd [Tue, 17 Jan 2006 11:48:16 +0000 (11:48 +0000)]
Move $FreeBSD$ from comment to __FBSDID().

18 years agoAdd two new variables:
phk [Tue, 17 Jan 2006 08:33:53 +0000 (08:33 +0000)]
Add two new variables:

# Size of the /etc ramdisk in 512 bytes sectors
NANO_RAM_ETCSIZE=10240

# Size of the /tmp+/var ramdisk in 512 bytes sectors
NANO_RAM_TMPVARSIZE=10240

And a last_orders() shell function which can be redefined to copy
finished images away, order peanuts or whatever else is appropriate

18 years agoFix a "free(): error: chunk is already free" under certain
dougb [Tue, 17 Jan 2006 08:01:00 +0000 (08:01 +0000)]
Fix a "free(): error: chunk is already free" under certain
circumstances that include circular dependencies.

PR:                     bin/91789
PR submitted by:        Frank Behrens <frank@pinky.sax.de>
Patch submitted by:     Divacky Roman <xdivac02@stud.fit.vutbr.cz>

18 years ago- Use better types.
pjd [Tue, 17 Jan 2006 07:32:43 +0000 (07:32 +0000)]
- Use better types.
- Log problems at level 0 when killing providers.

MFC after: 3 days

18 years agoCheck return value.
pjd [Tue, 17 Jan 2006 07:30:34 +0000 (07:30 +0000)]
Check return value.

Found by: Coverity Prevent(tm)
MFC after: 3 days

18 years agoRemove dead code.
pjd [Tue, 17 Jan 2006 07:27:46 +0000 (07:27 +0000)]
Remove dead code.

Found by: Coverity Prevent(tm)
MFC after: 3 days

18 years agoRemove unused value.
pjd [Tue, 17 Jan 2006 07:26:48 +0000 (07:26 +0000)]
Remove unused value.

Found by: Coverity Prevent(tm)
MFC after: 3 days

18 years agoLog situation when EIO is returned.
pjd [Tue, 17 Jan 2006 07:23:36 +0000 (07:23 +0000)]
Log situation when EIO is returned.

18 years agoRemove bio leak when EIO error is emulated.
pjd [Tue, 17 Jan 2006 07:22:44 +0000 (07:22 +0000)]
Remove bio leak when EIO error is emulated.

Found by: Coverity Prevent(tm)
MFC after: 3 days

18 years agoThe number of ticks per usec for YUKON_EC is 125.
yongari [Tue, 17 Jan 2006 06:58:25 +0000 (06:58 +0000)]
The number of ticks per usec for YUKON_EC is 125.

18 years agofix Rx checksum computation on little endian systems.
yongari [Tue, 17 Jan 2006 06:02:22 +0000 (06:02 +0000)]
fix Rx checksum computation on little endian systems.

Reported & Tested by: brad@OpenBSD

18 years agofix interrupt moderation timer frequencies for Yukon
yongari [Tue, 17 Jan 2006 05:57:44 +0000 (05:57 +0000)]
fix interrupt moderation timer frequencies for Yukon

Obtained from: OpenBSD

18 years agoremove trailing spaces
yongari [Tue, 17 Jan 2006 05:41:20 +0000 (05:41 +0000)]
remove trailing spaces

18 years agoIf the attempt to open the archive fails (either the client open
kientzle [Tue, 17 Jan 2006 04:49:04 +0000 (04:49 +0000)]
If the attempt to open the archive fails (either the client open
routine fails or the first read fails), invoke the client close
routine immediately so the client can clean up.  Also, don't store the
client pointers in this case, so that the client close routine can't
accidentally get called more than once.

A minor style fix to archive_read_open_fd.c while I'm here.

PR: 86453
Thanks to: Andrew Turner for reporting this and suggesting a fix.

18 years agoAdd support for "tp" format. tp was the standard system
kientzle [Tue, 17 Jan 2006 03:40:42 +0000 (03:40 +0000)]
Add support for "tp" format.  tp was the standard system
archiver for Fourth Edition through Sixth Edition Unix; it was
replaced by tar in Seventh Edition.  (First Edition through
Third Edition used "tap.")

Unfortunately, tp was not so very standard; there were a
few different variants.  The code here attempts to support
what I believe were the most common variants.

tp support is not yet enabled by archive_read_support_format_all(),
as I'm not yet entirely comfortable with the detection
heuristics.  People interested in experimenting can
add archive_read_support_format_tp() just after any calls
to archive_read_support_format_all() in bsdtar to see how
well this works.

TODO: tp format is roughly similar in structure to dump/restore
   archive formats used by many systems.  It should be possible
   to generalize this code to handle many dump/restore variants.
   Format detection heuristics are going to be rough, though.

Thanks to: Warren Toomey, whose very basic tp extraction programs
   and documentation made this possible.

18 years agoMention that the random time slept by "portsnap cron" is between 1 and
cperciva [Tue, 17 Jan 2006 03:02:44 +0000 (03:02 +0000)]
Mention that the random time slept by "portsnap cron" is between 1 and
3600 seconds.

Suggested by: Niki Denev
MFC after: 3 days

18 years agoSet flag in needsbuffer while still holding bqlock to avoid lost wakeup.
tegge [Mon, 16 Jan 2006 22:09:47 +0000 (22:09 +0000)]
Set flag in needsbuffer while still holding bqlock to avoid lost wakeup.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r154439,
sam [Mon, 16 Jan 2006 20:33:23 +0000 (20:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r154439,
which included commits to RCS files with non-trunk default branches.

18 years agocorrect dlt buffer alloc; this goes on the vendor branch as it
sam [Mon, 16 Jan 2006 20:33:23 +0000 (20:33 +0000)]
correct dlt buffer alloc; this goes on the vendor branch as it
will be committed there shortly

MFC after: 3 days

18 years agoFix broken capabilites. There are possible calculation errors within
ariff [Mon, 16 Jan 2006 20:01:33 +0000 (20:01 +0000)]
Fix broken capabilites. There are possible calculation errors within
ess_calcspeed8() and ess_calcspeed9() that need to be fixed as well
(TODO).

Reported by: [1] Claude Buisson <cbuisson at nerim.net>
MFC after: 3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003566.html

18 years agoehci_pci.c:
ariff [Mon, 16 Jan 2006 19:23:59 +0000 (19:23 +0000)]
ehci_pci.c:
ATI EHCI controllers exhibit simmilar stall issues and require
this dropped interrupts workaround. Be verbose about it.
ehci.c:
ehcivar.h:
Slight change in comments to note about issues surrounding both
VIA and ATI EHCI controllers.

Approved by: iedowse

18 years agoAdd PCI vendor id for ATI OHCI USB controllers.
ariff [Mon, 16 Jan 2006 19:07:05 +0000 (19:07 +0000)]
Add PCI vendor id for ATI OHCI USB controllers.

Approved by: iedowse

18 years agoAlthough we check the return value of copyin(9) while determaining how
csjp [Mon, 16 Jan 2006 17:03:21 +0000 (17:03 +0000)]
Although we check the return value of copyin(9) while determaining how
long the string is in userspace, afterwards we call malloc(M_WAITOK),
which could sleep for an unknown amount of time. Check the return
value of copyin(9) just to be sure that nothing has changed during that
time.

Found with: Coverity Prevent (tm)
MFC after: 1 week

18 years agoFix standalone module build.
ru [Mon, 16 Jan 2006 17:03:06 +0000 (17:03 +0000)]
Fix standalone module build.

Reported by: Boris Samorodov <bsam@ipt.ru>

18 years agoI couldn't find any traces of what the tags1 file was supposed to do.
ru [Mon, 16 Jan 2006 16:25:17 +0000 (16:25 +0000)]
I couldn't find any traces of what the tags1 file was supposed to do.

18 years agoRemove dependency on getopts because it is on /usr and we want to
wes [Mon, 16 Jan 2006 16:18:54 +0000 (16:18 +0000)]
Remove dependency on getopts because it is on /usr and we want to
use 'nextboot -D' in rc.  Option parsing cribbed from vgrind.sh.

18 years agoLoad the g_md kernel module if needed.
philip [Mon, 16 Jan 2006 13:26:05 +0000 (13:26 +0000)]
Load the g_md kernel module if needed.

Pointed out by: Gianmarco Giovannelli
Submitted by: matteo
MFC after: 3 days

18 years agoRestore use of strncpy(), as there is later unconditional termination
rwatson [Mon, 16 Jan 2006 11:54:07 +0000 (11:54 +0000)]
Restore use of strncpy(), as there is later unconditional termination
of the string, and reliance on the returned pointer.

Found by: bde (tm)

18 years agoRestore old compatibility of feeding directly into /dev/dsp at 8000 hz
ariff [Mon, 16 Jan 2006 11:07:15 +0000 (11:07 +0000)]
Restore old compatibility of feeding directly into /dev/dsp at 8000 hz
while preserving the New World Order.

Discussed with: [1] Michael W. Oliver <michael at gargantuan.com>
MFC after: 1 week

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003562.html

18 years agoREQUIRE named. On all systems I've examined running HEAD and
dougb [Mon, 16 Jan 2006 06:03:42 +0000 (06:03 +0000)]
REQUIRE named. On all systems I've examined running HEAD and
RELENG_6 this will be a noop, however as we introduce local
startup scripts to the base rcorder, we'll see more cases
where the previous status quo will need to be made explicit
to avoid having it disrupted when random local scripts are
added to the mix.

18 years agoEliminate unused code.
davidxu [Mon, 16 Jan 2006 05:33:48 +0000 (05:33 +0000)]
Eliminate unused code.

18 years agoAdd a separate simple internal base allocator and remove base_arena, so that
jasone [Mon, 16 Jan 2006 05:13:49 +0000 (05:13 +0000)]
Add a separate simple internal base allocator and remove base_arena, so that
there is never any need to recursively call the main allocation functions.

Remove recursive spinlock support, since it is no longer needed.

Allow chunks to be as small as the page size.

Correctly propagate OOM errors from arena_new().

18 years agoCorrect typos (s/OFERFLOW/OVERFLOW/).
kris [Mon, 16 Jan 2006 01:35:25 +0000 (01:35 +0000)]
Correct typos (s/OFERFLOW/OVERFLOW/).

Reviewed by: jhb

18 years agoRemove scary warning, since nullfs works fine thesedays.
kris [Mon, 16 Jan 2006 01:30:52 +0000 (01:30 +0000)]
Remove scary warning, since nullfs works fine thesedays.

MFC after: 1 week

18 years agoReplace strncpy() with strlcpy() when parsing login time limit strings
rwatson [Mon, 16 Jan 2006 00:52:20 +0000 (00:52 +0000)]
Replace strncpy() with strlcpy() when parsing login time limit strings
from /etc/login.conf, or an unterminated string buffer could result.
Probably, login_times.c should reject excessively long time strings as
unparseable, rather than truncating, which might render an invalid
string valid.

Found with: Coverity Prevent (tm)
Reviewed by: csjp
MFC after: 3 days

18 years agoRemove unnecessary and undesirable 'static' from function-local keg
rwatson [Mon, 16 Jan 2006 00:37:20 +0000 (00:37 +0000)]
Remove unnecessary and undesirable 'static' from function-local keg
list, which could cause problems for multi-threaded applications
using libmemstat to monitor UMA in more than one thread
simultaneously.

MFC after: 3 days

18 years agoDefine NO_TLS on ia64. The dynamic TLS implementation on ia64 is
marcel [Mon, 16 Jan 2006 00:32:46 +0000 (00:32 +0000)]
Define NO_TLS on ia64. The dynamic TLS implementation on ia64 is
broken for non-threaded shared processes in that __tls_get_addr()
assumes the thread pointer is always initialized. This is not the
case. When arenas_map is referenced in choose_arena() and it is
defined as a thread-local variable, it will result in a SIGSEGV.

PR: ia64/91846 (describes the TLS/ia64 bug).

18 years agoFix typo in comment.
rwatson [Mon, 16 Jan 2006 00:28:11 +0000 (00:28 +0000)]
Fix typo in comment.

MFC after: 3 days

18 years agoAdd ntp.cgi.cz.
ceri [Sun, 15 Jan 2006 23:15:41 +0000 (23:15 +0000)]
Add ntp.cgi.cz.

PR: bin/90095
Submitted by: Jakub Chromy <hicks at cgi dott cz>
Approved by: jhb (proxy mentor)
MFC after: 3 days

18 years agoMarius Nuennerich pointed out that nextboot(8) configured boot options
ceri [Sun, 15 Jan 2006 23:12:26 +0000 (23:12 +0000)]
Marius Nuennerich pointed out that nextboot(8) configured boot options
were now sticky.  This script was deleting /boot/nextkernel on boot, but
there is no code in the tree that creates that file since revision 1.15
of src/sbin/reboot/reboot.c.
nextboot(8) creates /boot/nextboot.conf, so remove that instead.

Approved by: jhb (proxy mentor)
MFC after: 1 week

18 years agoPreserve any additional arguments to ifconfig that were specified in the
ceri [Sun, 15 Jan 2006 23:00:07 +0000 (23:00 +0000)]
Preserve any additional arguments to ifconfig that were specified in the
DHCP case too.

PR: bin/74406
Approved by: jhb (proxy mentor)
MFC after: 3 days

18 years agoIf sysinstall was used to configure an anonymous FTP area, it was
ceri [Sun, 15 Jan 2006 22:57:17 +0000 (22:57 +0000)]
If sysinstall was used to configure an anonymous FTP area, it was
possible for information to be copied from the group file to the group
file in the FTP area.  This patch based on a patch from Zak Johnson
<zakj at nox dot cx>.

PR: bin/25851
Submitted by: Ted Mittelstaedt <tedm at toybox punkt placo period com>
Approved by: jhb (proxy mentor)
MFC after: 3 days
MFC to: RELENG_5, RELENG_6
Security: Prevents possible group information leakage

18 years agoCorrect obsolete chown syntax.
ceri [Sun, 15 Jan 2006 22:42:38 +0000 (22:42 +0000)]
Correct obsolete chown syntax.

PR: bin/90057
Submitted by: Charlie M. McDonald <BoredOutkast at yahoo punkt com>
Approved by: jhb (mentor by proxy)
MFC to: RELENG_5, RELENG_6
MFC After: 3 days

18 years agoHappy new year, a little late
imp [Sun, 15 Jan 2006 22:06:10 +0000 (22:06 +0000)]
Happy new year, a little late

18 years agoWork around a problem seen on VIA EHCI controllers where occasionally
iedowse [Sun, 15 Jan 2006 21:03:19 +0000 (21:03 +0000)]
Work around a problem seen on VIA EHCI controllers where occasionally
an interrupt appears to occur before the transfer has been marked
as completed. This caused umass transfers to get stuck, especially
when writing large files. The workaround sets up a timer that
rechecks for missed completed transfers if some operations are still
pending. Other suggested workarounds, such as performing a PCI read
immediately after acknowledging the interrupts, do not appear to
help.

Obtained from: OpenBSD

18 years agoSet sc_dying to 1 when detaching. In NetBSD and OpenBSD this was
iedowse [Sun, 15 Jan 2006 20:41:04 +0000 (20:41 +0000)]
Set sc_dying to 1 when detaching. In NetBSD and OpenBSD this was
done by the DVACT_DEACTIVATE case in *hci_activate(), but we don't
use that code in FreeBSD so it was never set.

18 years agoThe ehci driver doesn't use the transfer `hcpriv' field, so don't
iedowse [Sun, 15 Jan 2006 20:32:52 +0000 (20:32 +0000)]
The ehci driver doesn't use the transfer `hcpriv' field, so don't
bother setting it to NULL in ehci_root_ctrl_done().

18 years agoValidate that the supplied file is not empty before trying mmap(2) it
csjp [Sun, 15 Jan 2006 20:30:13 +0000 (20:30 +0000)]
Validate that the supplied file is not empty before trying mmap(2) it
and access the pages associated with it.

Submitted by: Wojciech A. Koszek
PR: bin/91411
MFC after: 1 week

18 years agovfs_busy can only return something useful if MNTK_UNMOUNT has been set.
csjp [Sun, 15 Jan 2006 20:14:11 +0000 (20:14 +0000)]
vfs_busy can only return something useful if MNTK_UNMOUNT has been set.
Since we are using vfs_busy() on a freshly allocated mount structure, use
(void) to show that we do not care about the return value.

Found with: Coverity Prevent (tm)
MFC after: 2 weeks

18 years agoCast VFS_STATFS() in vfs_domount() to (void) to indicate that ignoring the
rwatson [Sun, 15 Jan 2006 20:01:05 +0000 (20:01 +0000)]
Cast VFS_STATFS() in vfs_domount() to (void) to indicate that ignoring the
return value is intentional: this is simply an attempt to pre-cache the
statfs state.

Found with: Coverity Prevent (tm)
MFC after: 3 days

18 years agoFix an off-by-one bug.
ru [Sun, 15 Jan 2006 19:17:13 +0000 (19:17 +0000)]
Fix an off-by-one bug.

Submitted by: Ulrich Spoerlein

18 years agoModify the IP fragment reassembly code so that it uses a new UMA zone,
rwatson [Sun, 15 Jan 2006 18:58:21 +0000 (18:58 +0000)]
Modify the IP fragment reassembly code so that it uses a new UMA zone,
ipq_zone, to allocate fragment headers from, rather than using cast mbuf
storage.  This was one of the few remaining uses of mbuf storage for
local data structures that relied on dtom().  Implement the resource
limit on ipq's using UMA zone limits, but preserve current sysctl
semantics using a sysctl proc.

MFC after: 3 weeks

18 years agoBump date for previous commit before ru can hit me with his mdoc-stick.
brueffer [Sun, 15 Jan 2006 18:40:52 +0000 (18:40 +0000)]
Bump date for previous commit before ru can hit me with his mdoc-stick.

18 years agoMention the fire screensaver.
brueffer [Sun, 15 Jan 2006 18:30:40 +0000 (18:30 +0000)]
Mention the fire screensaver.

Submitted by: rionda

18 years agoStaticize ipqlock, since it is local to ip_input.c.
rwatson [Sun, 15 Jan 2006 17:05:48 +0000 (17:05 +0000)]
Staticize ipqlock, since it is local to ip_input.c.

MFC after: 3 days

18 years agoDon't leak mbufs and mbuf clusters in several error-handling situations
rwatson [Sun, 15 Jan 2006 12:09:03 +0000 (12:09 +0000)]
Don't leak mbufs and mbuf clusters in several error-handling situations
in the if_an receive routine.

Found with: Coverity Prevent (tm)
MFC after: 1 week

18 years agoIf frame length is excessive, don't leak an mbuf and cluster when
rwatson [Sun, 15 Jan 2006 12:06:09 +0000 (12:06 +0000)]
If frame length is excessive, don't leak an mbuf and cluster when
abandoning processing.

Found with: Coverity Prevent (tm)
MFC after: 1 week

18 years agoI don't believe these are used at all, and can be safely removed
imp [Sun, 15 Jan 2006 06:49:28 +0000 (06:49 +0000)]
I don't believe these are used at all, and can be safely removed

18 years agoAdd support for the Compaq LTE docking station. It includes a plug
imp [Sun, 15 Jan 2006 04:10:47 +0000 (04:10 +0000)]
Add support for the Compaq LTE docking station.  It includes a plug
and play device with the ID of PNP8160.  Sotr them while I'm here.

Submitted by: Sean Shapira    sds at jazzie dotty com
MFC After: 1 week

18 years agoRename uid and gid arguments to vaccess() prototype to match vaccess()
rwatson [Sun, 15 Jan 2006 02:01:51 +0000 (02:01 +0000)]
Rename uid and gid arguments to vaccess() prototype to match vaccess()
implementation in vfs_subr.c.  No functional change.

MFC after: 3 days

18 years agoInitialize ki to p->p_aioinfo after we know it's going to be referencing
csjp [Sun, 15 Jan 2006 01:55:45 +0000 (01:55 +0000)]
Initialize ki to p->p_aioinfo after we know it's going to be referencing
a valid kaioinfo structure. This avoids a potential NULL pointer dereference.

Found with: Coverity Prevent(tm)
MFC after: 2 weeks

18 years agoRemove unused code.
bz [Sun, 15 Jan 2006 01:39:01 +0000 (01:39 +0000)]
Remove unused code.

Found with: Coverity Prevent(tm)

18 years agoFix potential overrun of static stack allocated array which stores
csjp [Sun, 15 Jan 2006 01:02:20 +0000 (01:02 +0000)]
Fix potential overrun of static stack allocated array which stores
the rules. If an array is N elements large, we can only access
elements 0..(N-1).

MFC after: 1 week
Found with: Coverity Prevent(tm)

18 years agoI missed a whitespace in the generated commit message.
flz [Sun, 15 Jan 2006 01:01:46 +0000 (01:01 +0000)]
I missed a whitespace in the generated commit message.

Approved by: ssouhlal (implicit)