Commit Graph

57837 Commits

Author SHA1 Message Date
Gleb Smirnoff
9cc9484cb5 Back out 1.112,1.113. I don't have enough resources to fix breakages
introduced by this change.
2006-02-22 14:11:16 +00:00
Pawel Jakub Dawidek
290c616103 Do not use bio structure after g_io_deliver(), it may not longer by valid.
Found and fixed by:	Vsevolod Lobko <seva@ip.net.ua>
MFC after:		3 days
2006-02-22 10:21:05 +00:00
Jeff Roberson
c5dcb84008 - Revert r1.406 until a solution can be found that doesn't break nfs. The
statfs handler in nfs will lock vnodes which may lead to deadlock or
   recursion.

Found by:	kris
Pointy hat to:	me
2006-02-22 09:52:25 +00:00
Jeff Roberson
f50b03bfd6 - We must hold a reference to a vnode before calling vgone() otherwise
it may not be removed from the freelist.

MFC After:	1 week
Found by:	kris
2006-02-22 09:05:40 +00:00
Jeff Roberson
a4aeaefe5a - We can not hold a vnode lock while we do a lookup. Search for and load
modules prior to looking up the directory which we will cover to avoid
   this problem in mount.
 - We must hold the coveredvp locked before we can busy the mountpoint to
   prevent a lock order reversal with the vfs_busy() in lookup which holds
   the directory lock prior to doing a vfs_busy().  The directory lock is
   required to safely clear the v_mountedhere field on the directory.

MFC After:	1 week
2006-02-22 06:29:55 +00:00
Jeff Roberson
8a7cd2fdfb - Grab a mnt ref in vfs_busy() before dropping the interlock. This will
prevent the mount point from going away while we're waiting on the lock.
   The ref does not need to persist once we have the lock because the
   lock prevents the mount point from being unmounted.

MFC After:	1 week
2006-02-22 06:20:12 +00:00
Jeff Roberson
05b6a20a66 - Hold the vnode used in the statfs related functions until we're done with
the VFS_STATFS call to prevent the mount from disappearing while we're
   stating.
 - Convert these routines to use MPSAFE namei semantics.

MFC After:	1 week
2006-02-22 06:19:08 +00:00
Jeff Roberson
f5cacb3964 - spell VOP_LOCK(vp, LK_RELEASE... VOP_UNLOCK(vp,... so that asserts in
vop_lock_post do not trigger.
 - Rearrange null_inactive to null_hashrem earlier so there is no chance
   of finding the null node on the hash list after the locks have been
   switched.
 - We should never have a NULL lowervp in null_reclaim() so there is
   no need to handle this situation.  panic instead.

MFC After:	1 week
2006-02-22 06:17:31 +00:00
Jeff Roberson
9c12e63100 - Assert that the lowervp is locked in null_hashget().
- Simplify the logic dealing with recycled vnodes in null_hashget() and
   null_hashins().  Since we hold the lower node locked in both cases
   the null node can not be undergoing recycling unless reclaim somehow
   called null_nodeget().  The logic that was in place was not safe and
   was essentially dead code.

MFC After:	1 week
2006-02-22 06:15:12 +00:00
Jeff Roberson
f5a4db791d - Using LK_NOWAIT in qsync() can get us into infinite loop situations that
lead to deadlocks.  Remove it.

MFC After:	1 week
2006-02-22 06:12:53 +00:00
Jeff Roberson
578abc8e54 - Deadfs should not use the std GETWRITEMOUNT routine. Add one that always
returns NULL.

MFC After:	1 week
2006-02-22 06:11:59 +00:00
Matt Jacob
696e0ce44d Remove commented out qualifier to dumping a message. 2006-02-22 05:19:50 +00:00
David Xu
ba0360b135 Abstract function mqfs_create_node() to create a mqueue node. 2006-02-22 02:38:25 +00:00
David Xu
ad8de0f243 If block size is zero, use normal file operations to do I/O,
this eliminates a divided-by-zero fault.

Recommended by: phk
2006-02-22 00:05:12 +00:00
Sam Leffler
386d84f60e honor user-specified key index for global key slots
Submitted by:	Joe Love
Reviewed by:	avatar
MFC after:	1 week
2006-02-21 23:51:19 +00:00
John Baldwin
ca95b5146a Lock the vm_object while checking its type to see if it is a vnode-backed
object that requires Giant in vm_object_deallocate().  This is somewhat
hairy in that if we can't obtain Giant directly, we have to drop the
object lock, then lock Giant, then relock the object lock and verify that
we still need Giant.  If we don't (because the object changed to OBJT_DEAD
for example), then we drop Giant before continuing.

Reviewed by:	alc
Tested by:	kris
2006-02-21 22:09:54 +00:00
John Baldwin
bd106be404 Move the ruadd() in kern_exit() to save our final stats in our child
stats even further down in exit1() so that it includes the runtime and
tick counts from the final time slice for the dying thread.

Reviewed by:	phk
2006-02-21 21:48:42 +00:00
John Baldwin
6fc6433ecd Split calcru() back into a calcru1() function shared with calccru() and
a calcru() wrapper that passes a local rusage_ext on the stack that is
a snapshot to do the calculations on.  Now we can pass p->p_crux to
calcru1() in calccru() again which fixes the issues with runtime going
backwards messages when dead processes are harvested by init.

Reviewed by:	phk
Tested by:	Stefan Ehmann shoesoft at gmx dot net
2006-02-21 21:47:46 +00:00
Marius Strobl
0c05ab41ab - In the interrupt handler clear the interrupt source flags before
processing the interrupt events. If we clear them afterwards we
  can completely miss some events as the NIC can change the source
  flags while we're in the handler. In order to not get another
  interrupt while we're in ifp->if_input() with the driver lock
  dropped we now turn off NIC interrupts while in the interrupt
  handler. Previously this was meant to be achieved by clearing the
  interrupt source flags after processing the interrupt events but
  didn't really work as clearing these flags doesn't actually
  acknowledge and re-enable the events.
  This fixes the device timeouts seen with the VMware LANCE.
- Relax the watchdog timer somewhat; don't enable it until the last
  packet is enqueued and if there is a TX interrupt but there are
  still outstanding ones reload the timer.

Reported and tested by:	Morten Rodal <morten@rodal.no>
MFC after:		3 days
2006-02-21 20:20:43 +00:00
Ruslan Ermilov
aa00bc830f Clear csum_flags after reading data from socket buffer. Otherwise,
if ksocket is connected to an interface-type node somewhere later
in the graph (e.g., ng_eiface or ng_iface), the csum_data may be
applied to a wrong packet (if we encapsulate Ethernet or IP).

MFC after:	3 days
2006-02-21 13:04:39 +00:00
Yoshihiro Takahashi
c15ff0bc7b Initialize the port_bst and port_bsh variables.
The ed driver on pc98 was broken by if_edvar.h rev1.31.

Reported by:	Kaho Toshikazu (kaho at elam kais kyoto-u ac jp)
Tested by:	Eiji Kato (ekato at a1 mbn or jp)
MFC after:	3 days
2006-02-21 12:01:39 +00:00
Nate Lawson
ce1a23d397 Remove unused variable.
Coverity ID:	558
Found by:	Coverity Prevent
2006-02-21 03:19:24 +00:00
Nate Lawson
987b1ad6d5 Remove unused variable.
Coverity ID:	548
Found by:	Coverity Prevent
2006-02-21 03:16:58 +00:00
Nate Lawson
6dd47e5b2a Remove unused variable.
Coverity ID:	546
Found by:	Coverity Prevent
2006-02-21 03:15:26 +00:00
Sam Leffler
b197bba53b correct check for whether wpa is enabled
MFC after:	3 days
2006-02-20 20:49:56 +00:00
Sam Leffler
d3b3a464a5 treat setting the optional ie to a zero-length datum to mean "delete
the ie"; this helps drivers that (wrongly) check ic_opt_ie against NULL
when making decisions

Reviewed by:	luigi, avatar
MFC after:	3 days
2006-02-20 17:17:00 +00:00
Hajimu UMEMOTO
9bf40914d2 Obey opt_inet6.h in kernel build directory.
Reported by:	Peter Losher <plosher-keyword-freebsd.a36e57__at__plosh.net>
MFC after:	3 days
2006-02-20 12:30:32 +00:00
Yoshihiro Takahashi
58d89e5cef Disable the myri10ge driver on pc98. 2006-02-20 12:05:52 +00:00
Bernd Walter
4d3d7085f6 Copy MAC address to fix alignment problems.
Tested on alpha (AS600) with RTL8169S
Suggested by: jhb
2006-02-20 10:29:40 +00:00
Andrew Gallatin
2790e25d62 Hook the myri10ge driver to the i386 and amd64 module builds.
Sponsored by: Myricom Inc.
Reviewed by: scottl
2006-02-20 02:50:09 +00:00
Max Laier
009b3d3d4b ${.CURDIR} != pwd and since we use the shell version of if now we don't even
need to prepend it.

Found-by:	gallatin
2006-02-20 01:08:33 +00:00
Andrew Gallatin
b2fc195e1b 10GbE mode driver and binary firmware for Myricom's PCI-express NICs.
More info regarding these nics can be found at http://www.myri.com.

Please note that the files
sys/dev/myri10ge/{mcp_gen_header.h,myri10ge_mcp.h} are internally
shared between all our drivers (solaris, macosx, windows, linux, etc).
I'd like to keep these files unchanged, so I can just import newer
versions of them when the firmware API/ABI changes.  This means I'm
stuck with some of the crazy-long #define names, and possibly
non-style(9) characteristics of these files.

Many thanks to mlaier for doing firmware(9) just as I
needed it, and to scottl for his helpful review.

Reviewed by: scottl, glebius
Sponsored by: Myricom Inc.
2006-02-19 22:39:19 +00:00
Ian Dowse
199a2380fe Add a UQ_OPEN_CLEARSTALL quirk for devices that need a clear-stall
operation when a pipe is opened, and add an entry for the ST Micro
biometric CPU.

Submitted by:	Fredrik Lindberg
MFC after:	1 week
2006-02-19 14:48:02 +00:00
Marius Strobl
9789208431 - Don't bother traversing trap frames in stack_save(). This fixes panics
when option DEBUG_LOCKS is used. Trap frames are determined by checking
  whether the caller was one of the tl0_*() or tl1_*() asm functions via
  a newly added pair of dummy symbols in exception.S which mark the begin
  and end of these functions. The tl_trap_* pair marks those in the special
  .trap section and the tl_text_* in the regular .text section. Because
  of their performance penalty db_search_symbol()/db_symbol_values() and
  linker_ddb_search_symbol()/linker_ddb_symbol_values() aren't used here
  for determining the caller, with db_search_symbol()/db_symbol_values()
  additionally not being reentrant.
- For consistency, change db_backtrace() to also use the new markers for
  determining the tl0_*() and tl1_*() asm functions instead of bcmp()'ing
  the symbol name.
- Use FBSDID in db_trace.c.

PR:			93226
Based on a patch by:	Antoine Brodin <antoine.brodin@laposte.net>
Ok'ed by:		jhb
2006-02-19 11:54:46 +00:00
Yaroslav Tykhiy
c0d157d85f For the coda5 module, CODA_COMPAT_5 is mandatory, not optional.
Without CODA_COMPAT_5, it would be equivalent to the plain coda
module.  Therefore just add -DCODA_COMPAT_5 to CFLAGS instead of
fiddling with opt_coda.h.  This is particularly important when
the module is built along with the kernel and CODA_COMPAT_5 isn't
in the kernel conf file (and so not in opt_coda.h either).

MFC after:	3 days
2006-02-19 02:43:42 +00:00
Yaroslav Tykhiy
9be0cda615 Style: Remove blank lines before EOF.
Tested by:	cvs diff -B
2006-02-18 23:49:28 +00:00
Yaroslav Tykhiy
7ad7a38277 Work around the fact that nfsclient SRCS must include
nfs_diskless.c if NFS_ROOT is in effect, e.g., present
in the kernel config file.  Otherwise the built module
won't load due to an undefined reference to nfs_setup_diskless.

MFC after:	3 days
2006-02-18 23:31:49 +00:00
Andre Oppermann
80444f8803 The sysctls kern.ipc.[max_linkhdr|max_protohdr|max_hdr|max_datalen]
can't be changed from userland.  Make them read-only and provide
descriptions.

kern.ipc.max_datalen must never be less than one byte.  Enforce this
with a panic in net_init_domain().

Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-02-18 17:16:18 +00:00
Andre Oppermann
8e8aab7aec Remove unneeded includes and provide more accurate description
to others.

Submitted by:	garys
PR:		kern/86437
2006-02-18 17:05:00 +00:00
Andre Oppermann
da3482e0f6 Add missing TH_PUSH to the TH_FLAGS enumeration.
Submitted by:	Andre Albsmeier <Andre.Albsmeier-at-siemens.com>
PR:		kern/85203
2006-02-18 16:50:08 +00:00
Robert Watson
d8ff22ea7f Add system call auditing support for sparc64.
Submitted by:	brueffer
Obtained from:	TrustedBSD Project
2006-02-18 16:36:56 +00:00
Pawel Jakub Dawidek
3d48264f02 Inform when label disappears.
MFC after:	3 days
2006-02-18 11:24:00 +00:00
Pawel Jakub Dawidek
bdf2e45a5c Allow to use g_slice_orphan() from outside.
MFC after:	3 days
2006-02-18 11:21:17 +00:00
Pawel Jakub Dawidek
c058f51257 - Do not depend on fact that file system covers entire provider.
It won't work for file systems created with -s option.
  Use better file system verfication.
- Add myself to the copyright.

MFC after:	3 days
2006-02-18 10:59:47 +00:00
Ariff Abdullah
050519958c - Fix severe crackling after long running and abusive module load / unload by
forcing DMA alignment to default buffer size.
- Make sure DMA pointer properly aligned to avoid being truncated by caller
  which causing severe underruns and random popping (especially in 32bit
  playback / recording).
- Add AC97 inverted external amplifier quirk for Maxselect x710s
  - http://maxselect.ru/

MFC after:	1 week
2006-02-18 10:24:48 +00:00
Ariff Abdullah
fba6b23875 Fix random popping while playing in 32bit by increasing default buffer size
from 4096 to 8192.

MFC after:	1 week
2006-02-18 10:23:37 +00:00
Pawel Jakub Dawidek
17fb8ae78f This function returns nothing. 2006-02-18 03:04:26 +00:00
Pawel Jakub Dawidek
33361bb5db If provider's sector size prevents reading SBLOCKSIZE bytes return
immediatelly.
2006-02-18 03:00:49 +00:00
Max Laier
ff8e7669d6 Use shell's version of if to check if the firmware really exists in the
current directory to allow user rules to create the firmware (e.g. from a
uuencoded blob).  make's version of if is evaluated too early to catch this.

Found-by:	gallatin
2006-02-18 01:38:44 +00:00
Sam Leffler
08d7a88599 use s/w bmiss facility
MFC after:	1 week
2006-02-18 01:04:08 +00:00