]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agorev rate control api to pass the both the first+last tx descriptors
sam [Wed, 30 Mar 2005 20:17:18 +0000 (20:17 +0000)]
rev rate control api to pass the both the first+last tx descriptors
to the rate control module for tx complete processing; this enables
rate control algorithms to extract the packet length for xmits that
require multiple descriptors

19 years agoo extend cts to cover packet burst when operating in 11g w/ protection
sam [Wed, 30 Mar 2005 20:13:08 +0000 (20:13 +0000)]
o extend cts to cover packet burst when operating in 11g w/ protection
o check current channel parameters, not shadow state, for acm policy
  on data frames

19 years agofix typo
sam [Wed, 30 Mar 2005 19:28:00 +0000 (19:28 +0000)]
fix typo

19 years agoFix grammar error caused by my previous edit.
joerg [Wed, 30 Mar 2005 18:54:41 +0000 (18:54 +0000)]
Fix grammar error caused by my previous edit.
While being here, also update the copyright year.

Submitted by: ru

19 years agoPurge orphan catpages.
ru [Wed, 30 Mar 2005 18:02:49 +0000 (18:02 +0000)]
Purge orphan catpages.

PR: conf/35242
Submitted by: Annihilator <annihilator.c@usa.net>

19 years agoFix a possible mutex leak in KeSetTimerEx(): if timer is NULL, we
wpaul [Wed, 30 Mar 2005 16:22:48 +0000 (16:22 +0000)]
Fix a possible mutex leak in KeSetTimerEx(): if timer is NULL, we
bail out without releasing the dispatcher lock. Move the lock acquisition
after the pointer test to avoid this.

19 years agoMake the structure for handling the input stack local to the parse
harti [Wed, 30 Mar 2005 15:18:58 +0000 (15:18 +0000)]
Make the structure for handling the input stack local to the parse
module. The only module accessing it (the current line number) was the
condition module, so pass the current line number as a function argument.
Centralize the pushing of new input sources into one function
ParsePushInput() and rename the function handling the popping from ParseEOF()
to ParsePopInput(). Make the entire thing a little bit clearer, by holding
the current input source in the top element of the stack instead of
using extra variables for this. Use a type-safe intrusive list for the
input stack.

19 years agoFix a bug introduced in a previous commit: ParseModifier() consumes
harti [Wed, 30 Mar 2005 15:14:22 +0000 (15:14 +0000)]
Fix a bug introduced in a previous commit: ParseModifier() consumes
characters so it is not safe to move around code from
before it to after it. This should fix problems with building the
documentation.

Patch: 7.170

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoUse a taskqueue for led-handling to prevent a potential panic.
philip [Wed, 30 Mar 2005 15:06:11 +0000 (15:06 +0000)]
Use a taskqueue for led-handling to prevent a potential panic.

Submitted by: pjd

19 years agoAdd commented out ehci entry.
nyan [Wed, 30 Mar 2005 14:05:28 +0000 (14:05 +0000)]
Add commented out ehci entry.

19 years agoAdd over 32GB disk support on pc98 (userland part).
nyan [Wed, 30 Mar 2005 13:03:33 +0000 (13:03 +0000)]
Add over 32GB disk support on pc98 (userland part).

Submitted by: Hirokazu WATANABE

19 years agoRemove geometry translations here.
nyan [Wed, 30 Mar 2005 12:59:54 +0000 (12:59 +0000)]
Remove geometry translations here.

19 years agoWhoops, this got left out from the megacommit
sos [Wed, 30 Mar 2005 12:27:34 +0000 (12:27 +0000)]
Whoops, this got left out from the megacommit

19 years agoThis is the much rumoured ATA mkIII update that I've been working on.
sos [Wed, 30 Mar 2005 12:03:40 +0000 (12:03 +0000)]
This is the much rumoured ATA mkIII update that I've been working on.

o       ATA is now fully newbus'd and split into modules.
        This means that on a modern system you just load "atapci and ata"
        to get the base support, and then one or more of the device
        subdrivers "atadisk atapicd atapifd atapist ataraid".
        All can be loaded/unloaded anytime, but for obvious reasons you
        dont want to unload atadisk when you have mounted filesystems.

o       The device identify part of the probe has been rewritten to fix
        the problems with odd devices the old had, and to try to remove
        so of the long delays some HW could provoke. Also probing is done
without the need for interrupts, making earlier probing possible.

o       SATA devices can be hot inserted/removed and devices will be created/
        removed in /dev accordingly.
NOTE: only supported on controllers that has this feature:
Promise and Silicon Image for now.
On other controllers the usual atacontrol detach/attach dance is
still needed.

o Support for "atomic" composite ATA requests used for RAID.

o       ATA RAID support has been rewritten and and now supports these
        metadata formats:
                 "Adaptec HostRAID"
                 "Highpoint V2 RocketRAID"
                 "Highpoint V3 RocketRAID"
                 "Intel MatrixRAID"
                 "Integrated Technology Express"
                 "LSILogic V2 MegaRAID"
                 "LSILogic V3 MegaRAID"
                 "Promise FastTrak"
                 "Silicon Image Medley"
 "FreeBSD PseudoRAID"

o       Update the ioctl API to match new RAID levels etc.

o       Update atacontrol to know about the new RAID levels etc
        NOTE: you need to recompile atacontrol with the new sys/ata.h,
        make world will take care of that.
NOTE2: that rebuild is done differently from the old system as
the rebuild is now done piggybacked on read requests to the
array, so atacontrol simply starts a background "dd" to rebuild
the array.

o       The reinit code has been worked over to be much more robust.

o       The timeout code has been overhauled for races.

o Support of new chipsets.

o       Lots of fixes for bugs found while doing the modulerization and
        reviewing the old code.

Missing or changed features from current ATA:

o       atapi-cd no longer has support for ATAPI changers. Todays its
        much cheaper and alot faster to copy those CD images to disk
        and serve them from there. Besides they dont seem to be made
        anymore, maybe for that exact reason.

o       ATA RAID can only read metadata from all the above metadata formats,
not write all of them (Promise and Highpoint V2 so far). This means
that arrays can be picked up from the BIOS, but they cannot be
created from FreeBSD. There is more to it than just the missing
write metadata support, those formats are not unique to a given
controller like Promise and Highpoint formats, instead they exist
for several types, and even worse, some controllers can have
different formats and its impossible to tell which one.
The outcome is that we cannot reliably create the metadata of those
formats and be sure the controller BIOS will understand it.
However write support is needed to update/fail/rebuild the arrays
properly so it sits fairly high on the TODO list.

o       So far atapicam is not supported with these changes. When/if this
will change is up to the maintainer of atapi-cam so go there for
questions.

HW donated by:  Webveveriet AS
HW donated by:  Frode Nordahl
HW donated by:  Yahoo!
HW donated by:  Sentex
Patience by: Vife and my boys (and even the cats)

19 years ago When several carp interfaces are attached to Ethernet interface,
glebius [Wed, 30 Mar 2005 11:44:43 +0000 (11:44 +0000)]
  When several carp interfaces are attached to Ethernet interface,
carp_carpdev_state_locked() is called every time carp interface is attached.
The first call backs up flags of the first interface, and the second
call backs up them again, erasing correct values.
  To solve this, a carp_sc_state_locked() function is introduced. It is
called when interface is attached to parent, instead of calling
carp_carpdev_state_locked. carp_carpdev_state_locked() calls
carp_sc_state_locked() for each sc in chain.

Reported by: Yuriy N. Shkandybin, sem

19 years agoSupport VTOC volume names. This can be useful to distinguish multiple
joerg [Wed, 30 Mar 2005 09:33:10 +0000 (09:33 +0000)]
Support VTOC volume names.  This can be useful to distinguish multiple
disks in a system.  Solaris' format(1m) displays the volume names in
the disk overview.

MFC after: 1 month

19 years agoUse the usb_callout_* API instead of timeout()/untimeout() in order
iedowse [Wed, 30 Mar 2005 08:32:41 +0000 (08:32 +0000)]
Use the usb_callout_* API instead of timeout()/untimeout() in order
to avoid a race condition that can cause the ukbd timeout routine
to run after the keyboard has detached.

Reported and tested by: wpaul

19 years agoWhen allocating TLS and DTV, make sure that any unused slots in the DTV
dfr [Wed, 30 Mar 2005 08:28:26 +0000 (08:28 +0000)]
When allocating TLS and DTV, make sure that any unused slots in the DTV
are initialised to zero. When freeing TLS, don't attempt to free DTV
slots which were not used.

Pointed out by: Joerg Sonnenberger
X-MFC-After: After the branch, probably

19 years agoEliminate (now) unnecessary acquisition and release of the global page
alc [Wed, 30 Mar 2005 05:40:02 +0000 (05:40 +0000)]
Eliminate (now) unnecessary acquisition and release of the global page
queues lock in vm_object_backing_scan().  Updates to the page's PG_BUSY
flag and busy field are synchronized by the containing object's lock.

Testing the page's hold_count and wire_count in vm_object_backing_scan()'s
OBSC_COLLAPSE_NOWAIT case is unnecessary.  There is no reason why the held
or wired pages cannot be migrated to the shadow object.

Reviewed by: tegge

19 years agoEliminate v_id and v_ddid. This changes struct vnode, so all
das [Wed, 30 Mar 2005 03:02:16 +0000 (03:02 +0000)]
Eliminate v_id and v_ddid.  This changes struct vnode, so all
filesystem modules must be recompiled.  (Since struct vnode has
already changed in 6-CURRENT, there's little advantage to leaving
the unused fields around.)

19 years agoEliminate v_id and v_ddid. The name cache now holds references to
das [Wed, 30 Mar 2005 03:01:36 +0000 (03:01 +0000)]
Eliminate v_id and v_ddid.  The name cache now holds references to
vnodes whose names it caches, so we no longer need a `generation
number' to tell us if a referenced vnode is invalid.  Replace the use
of the parent's v_id in the hash function with the address of the
parent vnode.

Tested by: Peter Holm
Glanced at by: jeff, phk

19 years agoMerge kern___cwd() and vn_fullpath(), which were virtually identical,
das [Wed, 30 Mar 2005 02:59:32 +0000 (02:59 +0000)]
Merge kern___cwd() and vn_fullpath(), which were virtually identical,
except for places where people forget to update one of them.  We now
collect only one set of stats for both of these routines.  Other
changes in this commit include:

- Start acquiring Giant again in vn_fullpath(), since it is required
  when crossing a mount point.

- Expand the scope of the cache lock to avoid dropping it and
  picking it up again for every pathname component.  This also
  makes it trivial to avoid races in stats collection.

- Assert that nc_dvp == v_dd for directories instead of returning
  an error to userland when this is not true.  AFAIK, it should
  always be true when v_dd is non-null.

- For vn_fullpath(), handle the first (non-directory) vnode
  separately.

Glanced at by:  jeff, phk

19 years agoRemove a couple of #ifdef 0'ed code blocks left over from Atheros debugging.
wpaul [Wed, 30 Mar 2005 02:50:06 +0000 (02:50 +0000)]
Remove a couple of #ifdef 0'ed code blocks left over from Atheros debugging.

Remember to reset ndis_pendingreq to NULL when bailing out of
ndis_set_info() or ndis_get_info() due to miniportadapterctx not
being set.

19 years agoAttach ndiscvt(8) to the amd64 build.
wpaul [Wed, 30 Mar 2005 02:44:46 +0000 (02:44 +0000)]
Attach ndiscvt(8) to the amd64 build.

19 years agoFixing kernel build on amd64 machines.
avatar [Wed, 30 Mar 2005 02:33:33 +0000 (02:33 +0000)]
Fixing kernel build on amd64 machines.

Reviewed by: sam (mentor)

19 years agoextend the timestamp from the rx descriptor to calculate the tsf to
sam [Tue, 29 Mar 2005 22:16:49 +0000 (22:16 +0000)]
extend the timestamp from the rx descriptor to calculate the tsf to
use when checking for an ibss merge

19 years agoforgot to merge this bit from p4
sam [Tue, 29 Mar 2005 21:06:28 +0000 (21:06 +0000)]
forgot to merge this bit from p4

19 years agosync rates for any associated stations or neighbors on state transition
sam [Tue, 29 Mar 2005 21:00:50 +0000 (21:00 +0000)]
sync rates for any associated stations or neighbors on state transition

19 years agosimplify callback
sam [Tue, 29 Mar 2005 20:59:49 +0000 (20:59 +0000)]
simplify callback

19 years agoreplace m_defrag with something more suitable
sam [Tue, 29 Mar 2005 20:54:31 +0000 (20:54 +0000)]
replace m_defrag with something more suitable

19 years agohandle rejoin event
sam [Tue, 29 Mar 2005 20:24:13 +0000 (20:24 +0000)]
handle rejoin event

19 years agoCorrect formatting of pointers in the listing by using "0x%" PRIx64 instead of
anholt [Tue, 29 Mar 2005 20:17:47 +0000 (20:17 +0000)]
Correct formatting of pointers in the listing by using "0x%" PRIx64 instead of
"%" PRIu64 "x".

19 years agopass re-association events up using a new message type
sam [Tue, 29 Mar 2005 19:36:42 +0000 (19:36 +0000)]
pass re-association events up using a new message type

19 years ago- Don't free mbuf, passed to interface output method if the latter
glebius [Tue, 29 Mar 2005 13:43:09 +0000 (13:43 +0000)]
- Don't free mbuf, passed to interface output method if the latter
  returns error. In this case mbuf has already been freed. [1]
- Remove redundant declaration.

PR: kern/78893 [1]
Submitted by: Liang Yi [1]
Reviewed by: sam
MFC after: 1 day

19 years ago - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
jeff [Tue, 29 Mar 2005 13:16:38 +0000 (13:16 +0000)]
 - Remove wantparent, it is no longer necessary.  An assert in vfs_lookup.c
   prevents any callers from doing a modifying op without
   LOCKPARENT or WANTPARENT.  It wasn't even properly used in the CREATE
   or DELETE cases.

19 years ago - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
jeff [Tue, 29 Mar 2005 13:09:42 +0000 (13:09 +0000)]
 - Remove wantparent, it is no longer necessary.  An assert in vfs_lookup.c
   prevents any callers from doing a modifying op without
   LOCKPARENT or WANTPARENT.

19 years ago - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
jeff [Tue, 29 Mar 2005 13:04:00 +0000 (13:04 +0000)]
 - Remove wantparent, it is no longer necessary.  An assert in vfs_lookup.c
   prevents any callers from doing a DELETE or RENAME without locking
   the parent.

19 years ago - cache_lookup() now locks the new vnode for us to prevent some races.
jeff [Tue, 29 Mar 2005 13:00:37 +0000 (13:00 +0000)]
 - cache_lookup() now locks the new vnode for us to prevent some races.
   Remove redundant code.

Sponsored by: Isilon Systems, Inc.

19 years ago - Move the logic that locks and refs the new vnode from vfs_cache_lookup()
jeff [Tue, 29 Mar 2005 12:59:06 +0000 (12:59 +0000)]
 - Move the logic that locks and refs the new vnode from vfs_cache_lookup()
   to cache_lookup().  This allows us to acquire the vnode interlock before
   dropping the cache lock.  This protects the vnodes identity until we
   have locked it.

Sponsored by: Isilon Systems, Inc.

19 years agoAdds sha256 support. While it is a good idea to also add sha384 and
tobez [Tue, 29 Mar 2005 11:44:17 +0000 (11:44 +0000)]
Adds sha256 support.  While it is a good idea to also add sha384 and
sha512, I did not do that since it is not entirely clear where "the one
true place" to hold their implementations is going to be.  Sha256 is
different since mtree already links against libmd.

Make recommended procedure for integrity checking in the manpage
consistent.

Fix a bug with -f spec1 -f spec2 comparison, which prevented
test/tes03.sh from running successfully.

Reviewed by: phk, cperciva

19 years ago We don't need no major numbers
phk [Tue, 29 Mar 2005 11:26:14 +0000 (11:26 +0000)]
We don't need no major numbers
We don't need a mknod(2) call
No tricky install documentation
Kernel leave them dev_t alone
Hey Kernel leave them cdevsw alone
All in all it's just another struct in src/sys
All in all you're just another struct in src/sys

19 years agoDon't generate major.c anymore.
phk [Tue, 29 Mar 2005 11:23:25 +0000 (11:23 +0000)]
Don't generate major.c anymore.

19 years agoRemove the global cdev hash and use the cdevsw list instead.
phk [Tue, 29 Mar 2005 11:15:54 +0000 (11:15 +0000)]
Remove the global cdev hash and use the cdevsw list instead.

Don't remove the now unused element from cdev yet, wait until
we have a better reason to bump the version.

There is now no longer any upper limit on how many device drivers
a FreeBSD kernel can have.

19 years agoRevert to the more correct array size, and correct a KASSERT to
markm [Tue, 29 Mar 2005 11:08:45 +0000 (11:08 +0000)]
Revert to the more correct array size, and correct a KASSERT to
only allow proper values. ENTROPYSOURCE is a maxval+1, not an
allowable number.

Suggested loose protons in the solution: phk
Prefers to keep the pH close to seven: markm

19 years ago - Initial cn_lkflags to LK_EXCLUSIVE.
jeff [Tue, 29 Mar 2005 10:16:12 +0000 (10:16 +0000)]
 - Initial cn_lkflags to LK_EXCLUSIVE.

Sponsored by: Isilon Systems, Inc.

19 years ago - Upgrade a shared lock request to exclusive in ffs_vget() if we have
jeff [Tue, 29 Mar 2005 10:10:51 +0000 (10:10 +0000)]
 - Upgrade a shared lock request to exclusive in ffs_vget() if we have
   to create the vnode.

Sponsored by: Isilon Systems, Inc.

19 years ago - Honor the cn_lkflags passed from namei() when locking the leaf.
jeff [Tue, 29 Mar 2005 10:10:01 +0000 (10:10 +0000)]
 - Honor the cn_lkflags passed from namei() when locking the leaf.

Sponsored by: Isilon Systems, Inc.

19 years ago - Get rid of the old LOOKUP_SHARED code. namei() now supplies the
jeff [Tue, 29 Mar 2005 10:08:23 +0000 (10:08 +0000)]
 - Get rid of the old LOOKUP_SHARED code.  namei() now supplies the
   proper lock flags via cn_lkflag.

Sponsored by: Isilon Systems, Inc.

19 years ago - Set cn_lkflags to LK_SHARED in the LOOKUP_SHARED case so that we only
jeff [Tue, 29 Mar 2005 10:07:15 +0000 (10:07 +0000)]
 - Set cn_lkflags to LK_SHARED in the LOOKUP_SHARED case so that we only
   acquire shared locks on intermediate directories.
 - For the LASTCN, we may have to LK_UPGRADE the parent directory before
   we lookup the last component.
 - Acquire VFS_ROOT and dp locks based on the cn_lkflag.

Sponsored by: Isilon Systems, Inc.

19 years ago - Add a lock flag to the component name so that namei() may request a
jeff [Tue, 29 Mar 2005 10:04:25 +0000 (10:04 +0000)]
 - Add a lock flag to the component name so that namei() may request a
   shared lock.  Filesystems are not required to honor this request.

Sponsored by: Isilon Systems, Inc.

19 years ago - Dont clear OWEINACT in vbusy(), we still owe an inactive call if someone
jeff [Tue, 29 Mar 2005 10:02:48 +0000 (10:02 +0000)]
 - Dont clear OWEINACT in vbusy(), we still owe an inactive call if someone
   vhold()s us.
 - Avoid an extra mutex acquire and release in the common case of vgonel()
   by checking for OWEINACT at the start of the function.
 - Fix the case where we set OWEINACT in vput().  LK_EXCLUPGRADE drops our
   shared lock if it fails.

Sponsored by: Isilon Systems, Inc.

19 years ago - Don't initial v_dd here, let cache_purge() do it for us.
jeff [Tue, 29 Mar 2005 09:59:34 +0000 (09:59 +0000)]
 - Don't initial v_dd here, let cache_purge() do it for us.

Sponsored by: Isilon Systems, Inc.

19 years ago - Invalidate the childrens v_dd pointers when we cache_purge() a directory.
jeff [Tue, 29 Mar 2005 09:58:41 +0000 (09:58 +0000)]
 - Invalidate the childrens v_dd pointers when we cache_purge() a directory.
   Otherwise the stale pointer may be accessed after a vnode is freed.

Sponsored by: Isilon Systems, Inc.

19 years agoRemove the global cdev hash and use the cdevsw list instead.
phk [Tue, 29 Mar 2005 09:56:21 +0000 (09:56 +0000)]
Remove the global cdev hash and use the cdevsw list instead.

Don't remove the now unused element from cdev yet, wait until
we have a better reason to bump the version.

19 years agoThere's really no need to have this be #ifdef PC98, so remove one more
imp [Tue, 29 Mar 2005 09:22:40 +0000 (09:22 +0000)]
There's really no need to have this be #ifdef PC98, so remove one more
of them from the tree.

19 years agoPrivatize major().
phk [Tue, 29 Mar 2005 08:13:17 +0000 (08:13 +0000)]
Privatize major().

19 years agoPrint name of device instead of useless major/minor numbers.
phk [Tue, 29 Mar 2005 08:13:01 +0000 (08:13 +0000)]
Print name of device instead of useless major/minor numbers.

19 years agoClean up the support for extracting very long pathnames.
kientzle [Tue, 29 Mar 2005 05:24:08 +0000 (05:24 +0000)]
Clean up the support for extracting very long pathnames.

19 years agohandle malloc failure and don't proceed when the bios call to
sam [Tue, 29 Mar 2005 01:48:21 +0000 (01:48 +0000)]
handle malloc failure and don't proceed when the bios call to
get parameters passed to malloc fails

Noticed by: Coverity Prevent analysis tool (malloc failure)

19 years agoplug resource leak
sam [Tue, 29 Mar 2005 01:46:25 +0000 (01:46 +0000)]
plug resource leak

Noticed by: Coverity Prevent analysis tool

19 years agofix potential null ptr deref
sam [Tue, 29 Mar 2005 01:44:59 +0000 (01:44 +0000)]
fix potential null ptr deref

Submitted by: Coverity Prevent analysis tool

19 years agohandle ciss_lookup failure
sam [Tue, 29 Mar 2005 01:44:17 +0000 (01:44 +0000)]
handle ciss_lookup failure

Noticed by: Coverity Prevent analysis tool

19 years agocheck for malloc failure (also move malloc up to simplify error recovery)
sam [Tue, 29 Mar 2005 01:26:27 +0000 (01:26 +0000)]
check for malloc failure (also move malloc up to simplify error recovery)

Noticed by: Coverity Prevent analysis tool
Reviewed by: gnn

19 years agoeliminate extraneous null ptr checks
sam [Tue, 29 Mar 2005 01:10:46 +0000 (01:10 +0000)]
eliminate extraneous null ptr checks

Noticed by: Coverity Prevent analysis tool

19 years agoChange the Romania NTP server to point to a working server.
jhb [Mon, 28 Mar 2005 22:24:32 +0000 (22:24 +0000)]
Change the Romania NTP server to point to a working server.

Submitted by: Ion-Mihai Tetcu itetcu at people dot tecnik93 dot com
MFC after: 3 days

19 years agoInitialize iovlen variable to 0 before passing it by reference to the
kan [Mon, 28 Mar 2005 22:21:45 +0000 (22:21 +0000)]
Initialize iovlen variable to 0 before passing it by reference to the
build_iovec function.

Tripped over by: Craig  Rodrigues

19 years agobus is unused, so eliminate it.
imp [Mon, 28 Mar 2005 22:11:58 +0000 (22:11 +0000)]
bus is unused, so eliminate it.
Minor style(9) tweaks

19 years agoThe filehandle allocated in NdisOpenFile() is allocated using
wpaul [Mon, 28 Mar 2005 22:03:47 +0000 (22:03 +0000)]
The filehandle allocated in NdisOpenFile() is allocated using
ExAllocatePoolWithTag(), not malloc(), so it should be released
with ExFreePool(), not free(). Fix a couple if instances of
free(fh, ...) that got overlooked.

19 years agoRemove the last vestiges of the "wait for link down event" hack.
wpaul [Mon, 28 Mar 2005 21:48:15 +0000 (21:48 +0000)]
Remove the last vestiges of the "wait for link down event" hack.

19 years agoAnother Coverity fix from Sam: add NULL pointer test in
wpaul [Mon, 28 Mar 2005 21:09:00 +0000 (21:09 +0000)]
Another Coverity fix from Sam: add NULL pointer test in
NdisMFreeSharedMemory() (if the list is already empty, just bail).

19 years agoMore additions for amd64:
wpaul [Mon, 28 Mar 2005 20:46:08 +0000 (20:46 +0000)]
More additions for amd64:

- On amd64, InterlockedPushEntrySList() and InterlockedPopEntrySList()
  are mapped to ExpInterlockedPushEntrySList and
  ExpInterlockedPopEntrySList() via macros (which do the same thing).
  Add IMPORT_FUNC_MAP()s for these.

- Implement ExQueryDepthSList().

19 years agoFix resource leak found by Coverity (via Sam Leffler).
wpaul [Mon, 28 Mar 2005 20:16:26 +0000 (20:16 +0000)]
Fix resource leak found by Coverity (via Sam Leffler).

19 years agoFix for amd64.
wpaul [Mon, 28 Mar 2005 20:13:14 +0000 (20:13 +0000)]
Fix for amd64.

19 years agoFix another amd64 issue with lookaside lists: we initialize the
wpaul [Mon, 28 Mar 2005 19:27:58 +0000 (19:27 +0000)]
Fix another amd64 issue with lookaside lists: we initialize the
alloc and free routine pointers in the lookaside list with pointers
to ExAllocatePoolWithTag() and ExFreePool() (in the case where the
driver does not provide its own alloc and free routines). For amd64,
this is wrong: we have to use pointers to the wrapped versions of these
functions, not the originals.

19 years agoavoid potential null ptr deref by free'ing excess mbufs instead of
sam [Mon, 28 Mar 2005 18:51:58 +0000 (18:51 +0000)]
avoid potential null ptr deref by free'ing excess mbufs instead of
zero'ing their length (copied from m_adj where this code came from
after the equivalent change there has had time to soak)

Noticed by: Coverity Prevent analysis tool

19 years agocheck return value of gdb_rx_varhex
sam [Mon, 28 Mar 2005 18:31:18 +0000 (18:31 +0000)]
check return value of gdb_rx_varhex

Noticed by: Coverity Prevent analysis tool
Reviewed by: kan

19 years agoAdd directory hierarchy copying example.
obrien [Mon, 28 Mar 2005 18:18:44 +0000 (18:18 +0000)]
Add directory hierarchy copying example.

19 years agoBring rev 1.31 to the AMD64 platform.
obrien [Mon, 28 Mar 2005 18:06:44 +0000 (18:06 +0000)]
Bring rev 1.31 to the AMD64 platform.
This adds support for the SiS intergrated NIC on some Athlon64 motherboards.
The MAC address is stored in the APC CMOS RAM and this fixes the
sis driver ending up with a 00:00:00:00:00:00 MAC address.

Submitted by: Stasys Smailys <ssmailys@komvista.lt>

19 years agocheck copyin/copyout return values
sam [Mon, 28 Mar 2005 17:52:12 +0000 (17:52 +0000)]
check copyin/copyout return values

Noticed by: Coverity Prevent analysis tool

19 years agofix null ptr deref when nge_newbuf is called with an existing mbuf
sam [Mon, 28 Mar 2005 17:49:03 +0000 (17:49 +0000)]
fix null ptr deref when nge_newbuf is called with an existing mbuf

Noticed by: Coverity Prevent analysis tool

19 years agoTweak to hopefully make lookaside lists work on amd64: in Windows, the
wpaul [Mon, 28 Mar 2005 17:36:06 +0000 (17:36 +0000)]
Tweak to hopefully make lookaside lists work on amd64: in Windows, the
nll_obsoletelock field in the lookaside list structure is only defined
for the i386 arch. For amd64, the field is gone, and different list
update routines are used which do their locking internally. Apparently
the Inprocomm amd64 driver uses lookaside lists. I'm not positive this
will make it work yet since I don't have an Inprocomm NIC to test, but
this needs to be fixed anyway.

19 years agoSpell '0' as 'FALSE' when initializing npp_validcounts. (Doesn't change
wpaul [Mon, 28 Mar 2005 17:06:47 +0000 (17:06 +0000)]
Spell '0' as 'FALSE' when initializing npp_validcounts. (Doesn't change
the code, but emphasises that this field is used as a boolean.)

19 years agoUnbreak the build: correct the resource list traversal code for
wpaul [Mon, 28 Mar 2005 16:49:27 +0000 (16:49 +0000)]
Unbreak the build: correct the resource list traversal code for
__FreeBSD_version >= 600022.

19 years agoCorrect a pair of buffer overflows in the telnet(1) command:
nectar [Mon, 28 Mar 2005 14:45:12 +0000 (14:45 +0000)]
Correct a pair of buffer overflows in the telnet(1) command:

 (CAN-2005-0468) A heap buffer overflow in env_opt_add() and related
 functions.

 (CAN-2005-0469) A global uninitialized data section buffer overflow in
 slc_add_reply() and related functions.

As a result of these vulnerabilities, it may be possible for a malicious
telnet server or active network attacker to cause telnet(1) to execute
arbitrary code with the privileges of the user running it.

Security: CAN-2005-0468, CAN-2005-0469
Security: FreeBSD-SA-05:01.telnet
Security: http://www.idefense.com/application/poi/display?id=220&type=vulnerabilities
Security: http://www.idefense.com/application/poi/display?id=221&type=vulnerabilities

These fixes are based in part on patches
Submitted by: Solar Designer <solar@openwall.com>

19 years ago - Correct the dprintf format int the _lookup routine.
jeff [Mon, 28 Mar 2005 14:26:01 +0000 (14:26 +0000)]
 - Correct the dprintf format int the _lookup routine.

Spotted by: pjd

19 years ago - Remove an unused variable from relookup().
jeff [Mon, 28 Mar 2005 13:56:56 +0000 (13:56 +0000)]
 - Remove an unused variable from relookup().
 - Assert that REMOVE, CREATE, and RENAME callers have WANTPARENT
   or LOCKPARENT set.  You can't complete any of these operations without
   at least a reference to the parent.  Many filesystems check for this case
   even though it isn't possible in the current system.

19 years ago - Garbage collect an unused variable.
jeff [Mon, 28 Mar 2005 13:45:09 +0000 (13:45 +0000)]
 - Garbage collect an unused variable.

19 years ago - Don't panic if we can't lock a child in lookup, return an error instead.
jeff [Mon, 28 Mar 2005 13:39:16 +0000 (13:39 +0000)]
 - Don't panic if we can't lock a child in lookup, return an error instead.
 - Only unlock the directory if this is a DOTDOT lookup.  Previously this
   code could have deadlocked if there was a DOTDOT lookup with LOCKPARENT
   set and another thread was locking the other way up the tree.

Sponsored by: Isilon Systems, Inc.

19 years ago - Remove an unused variable.
jeff [Mon, 28 Mar 2005 13:29:48 +0000 (13:29 +0000)]
 - Remove an unused variable.

Sponsored by: Isilon Systems, Inc.

19 years ago - Remove unnecessary LOCKPARENT manipulation.
jeff [Mon, 28 Mar 2005 13:29:15 +0000 (13:29 +0000)]
 - Remove unnecessary LOCKPARENT manipulation.

Sponsored by: Isilon Systems, Inc.

19 years ago - Rev 1.83 of kern_lock.c fixes the td_locks assert, reenable it here.
jeff [Mon, 28 Mar 2005 12:52:46 +0000 (12:52 +0000)]
 - Rev 1.83 of kern_lock.c fixes the td_locks assert, reenable it here.

Sponsored by: Isilon Systems, Inc.

19 years ago - Don't bump the count twice in the LK_DRAIN case.
jeff [Mon, 28 Mar 2005 12:52:10 +0000 (12:52 +0000)]
 - Don't bump the count twice in the LK_DRAIN case.

Sponsored by: Isilon Systems, Inc.

19 years ago - Fix the lockmgr flags so that external flags and internal flags are
jeff [Mon, 28 Mar 2005 11:31:20 +0000 (11:31 +0000)]
 - Fix the lockmgr flags so that external flags and internal flags are
   grouped together with room for each set to expand.  This makes the
   external lock mask sane.

Sponsored by: Isilon Systems, Inc.

19 years ago - Move code that should probably be an assert above the main body of
jeff [Mon, 28 Mar 2005 11:18:47 +0000 (11:18 +0000)]
 - Move code that should probably be an assert above the main body of
   vrele so that we can decrease the indentation of the real work and
   make things slightly more clear.

Sponsored by: Isilon Systems, Inc.

19 years agoCheck that supplied facility is not bigger than LOG_NFACILITIES.
glebius [Mon, 28 Mar 2005 10:59:19 +0000 (10:59 +0000)]
Check that supplied facility is not bigger than LOG_NFACILITIES.

PR: bin/79260
Submitted by: Shuichi KITAGUCHI

19 years agoBump .Dd for the previous commit.
brueffer [Mon, 28 Mar 2005 10:28:57 +0000 (10:28 +0000)]
Bump .Dd for the previous commit.

19 years ago - Remove the now-unused LK_REENABLE flag.
jeff [Mon, 28 Mar 2005 10:00:58 +0000 (10:00 +0000)]
 - Remove the now-unused LK_REENABLE flag.

Sponsored by: Isilon Systems, Inc.

19 years ago - nwfs_lookup() is no longer responsible for unlocking the dvp, this is
jeff [Mon, 28 Mar 2005 09:46:33 +0000 (09:46 +0000)]
 - nwfs_lookup() is no longer responsible for unlocking the dvp, this is
   handled in vfs_lookup.c.  This code was missing PDIRUNLOCK use prior
   to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c.

Sponsored by: Isilon Systems, Inc.

19 years ago - Fix the hpfs build, hpfs_hash.c was removed from the repository.
jeff [Mon, 28 Mar 2005 09:41:25 +0000 (09:41 +0000)]
 - Fix the hpfs build, hpfs_hash.c was removed from the repository.

19 years ago - hpfs_lookup() is no longer responsible for unlocking the dvp, this is
jeff [Mon, 28 Mar 2005 09:40:59 +0000 (09:40 +0000)]
 - hpfs_lookup() is no longer responsible for unlocking the dvp, this is
   handled in vfs_lookup.c.  This code was missing PDIRUNLOCK use prior
   to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c.

Sponsored by:   Isilon Systems, Inc.