Commit Graph

133773 Commits

Author SHA1 Message Date
Konstantin Belousov
f5baf8d66b Lock Giant and proctree lock around dereferencing p_session->s_ttyvp->v_rdev.
Lock cdev mutex too to close the race with tty being freed.
Relock clone_drain_lock to prevent the LOR with proctree lock, thus
add #include <fs/devfs/devfs_int.h>.

Suggested by:	tegge
Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:46:37 +00:00
Konstantin Belousov
8a5d7ef25c Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from pty clone handler.
Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:45:52 +00:00
Konstantin Belousov
0a9c2b6db8 Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from the clone handler.
Lock Giant in the clone handler.
Use destroy_dev_sched() explicitely from pty_maybecleanup() and postpone
pty_release() until both master and slave cdevs are destroyed by setting
it as callback for destroy_dev_sched().

Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:44:59 +00:00
Konstantin Belousov
5977b8fee1 Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from snp clone handler.
Drain clone events and cdev destruction from the module unload handler.

Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:43:56 +00:00
Konstantin Belousov
6f0281937b Automatically detect deadlock condition in destroy_dev(), that is, if
destroy_dev() is called from csw method, and no d_purge driver method is
provided. Transform the direct call to destroy_dev() into destroy_dev_sched().

Reviewed by:	njl (programming interface)
Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:43:20 +00:00
Konstantin Belousov
de10ffa527 Since rev. 1.199 of sys/kern/kern_conf.c, the thread that calls
destroy_dev() from d_close() cdev method would self-deadlock.
devfs_close() bump device thread reference counter, and destroy_dev()
sleeps, waiting for si_threadcount to reach zero for cdev without
d_purge method.

destroy_dev_sched() could be used instead from d_close(), to
schedule execution of destroy_dev() in another context. The
destroy_dev_sched_drain() function can be used to drain the scheduled
calls to destroy_dev_sched(). Similarly, drain_dev_clone_events() drains
the events clone to make sure no lingering devices are left after
dev_clone event handler deregistered.

make_dev_credf(MAKEDEV_REF) function should be used from dev_clone
event handlers instead of make_dev()/make_dev_cred() to ensure that created
device has reference counter bumped before cdev mutex is dropped inside
make_dev().

Reviewed by:	tegge (early versions), njl (programming interface)
Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:42:37 +00:00
Konstantin Belousov
7aee5992a5 Relock the sema_mtxp unconditionally after copyin() for SETALL case in
kern_semctl. Otherwise, later mtx_unlock() can operate on unlocked mutex.

Submitted by:	rdivacky
MFC after:	3 days
Approved by:	re (kensmith)
2007-07-03 15:58:47 +00:00
Bruce A. Mah
b30e4bb39f New release notes: uark(4), nxge(4), KAME IPsec removal and
FAST_IPSEC promotion, wicontrol(8) gone, PF 4.1.

Modified release notes:  netstat(1) IPsec stats (modified for KAME
IPsec removal).

MFC noted:  less v406.

Approved by:	re (implicitly)
2007-07-03 15:34:00 +00:00
Bruce A. Mah
979848e3c1 New release note: gjournal(8).
PR:		docs/114070
Reminded by:	Adam McDougall
Approved by:	re (implicitly)
2007-07-03 14:17:11 +00:00
Max Laier
e298b784dc Lost these during the import. Hand me the pointy hat.
Approved by:	re (implicit)
2007-07-03 14:08:49 +00:00
Max Laier
be65697f37 Add a note about the pf update, mark libexec/ftp-proxy as obsolete and bump
__FreeBSD_version for ports.

Approved by:	re (implicit)
2007-07-03 13:06:45 +00:00
Max Laier
44e0d5a8df Add two place holders in struct pf_rule for future netgraph integration.
Submitted by:	Ermal Luçi
Approved by:	re (kensmith)
2007-07-03 12:58:33 +00:00
Max Laier
60ee384760 Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
 - add tftp-proxy
 - new altq mtag link

Approved by:	re (kensmith)
2007-07-03 12:46:08 +00:00
Max Laier
5ee7cd2107 Commit resolved import of OpenBSD 4.1 pf userland from perforce.
Approved by:	re (kensmith)
2007-07-03 12:30:03 +00:00
Max Laier
fc515400ab This commit was generated by cvs2svn to compensate for changes in r171169,
which included commits to RCS files with non-trunk default branches.
2007-07-03 12:22:02 +00:00
Max Laier
67ecd4f3a4 Import pf userland from OpenBSD 4.1 and (for ftp-proxy) libevent 1.3b as
a local lib.
2007-07-03 12:22:02 +00:00
Max Laier
c9a03d91ad Commit resolved import of OpenBSD 4.1 pf from perforce.
Approved by:	re (kensmith)
2007-07-03 12:16:07 +00:00
George V. Neville-Neil
b2630c2934 Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC
option is now deprecated, as well as the KAME IPsec code.
What was FAST_IPSEC is now IPSEC.

Approved by: re
Sponsored by: Secure Computing
2007-07-03 12:13:45 +00:00
Max Laier
25929d7851 This commit was generated by cvs2svn to compensate for changes in r171164,
which included commits to RCS files with non-trunk default branches.
2007-07-03 12:06:01 +00:00
Max Laier
42247cbcaf Import pf from OpenBSD 4.1 2007-07-03 12:06:01 +00:00
Max Laier
d786f620df Fix hardware checksum verification on fragments.
MFC after:		7 days
Reported/tested by: 	Hugo Koji Kobayashi, Vadym Chepkov
Reviewed/help by:	yongari
Approved by:		re (kensmith)
2007-07-03 11:50:02 +00:00
Tai-hwa Liang
1a1f3aa129 Fixing !INET6 + FAST_IPSEC builds.
Reviewed by:	gnn
Approved by:	re (kensmith)
2007-07-03 07:20:20 +00:00
Matt Jacob
4607e8eed3 Recover from some major omissions/problems with the 24XX port.
First, we were never correctly checking for a 24XX Status Type 0
response- that cased us to fall through to evaluate status for
commands as if this were a 2100/2200/2300 Status Type 0 response.
This is *close*, but not quite the same. This has been reported
to be apparent with some wierd lun configuration problems with
some arrays. It became glaringly apparent on sparc64 where none
of the correct byte swap things were done.

Fixing this omission then caused a whole universe shifting debug
cycle of endian issues for the 2400. The manual for 24XX f/w turns
out to be wrong about the endianness of a couple of entities. The
lun and cdb fields for the type 7 request are *not* unconditionally
big endian- they happen to be opposite of whatever the endian of
the current machine type is. Same with the sense data for the
24XX type 0 response.

While we're at it investigate and resolve some NVRAM endian
issues.

Approved by:	re (ken)
MFC after:	3 days
2007-07-02 20:08:20 +00:00
Randall Stewart
5bead43650 - Consolidate the code that free's chunks to actually also
call the sctp_free_remote_address() function.
- Assure that when we allocate a chunk the whoTo is NULL,
  also when we free it and place it into the cache we NULL
  it (that way the consolidation code will always work).
- Fix a small race, when a empty data holder is left on the stream
  out queue, and both sides do a shutdown, the empty data holder
  would prevent us from sending a SHUTDOWN-ACK and at the same time we
  never  would cleanup the empty holder (since nothing was ever in queue).
  We now add a utility function that a) cleans up empty holders and
  b) properly determines if there are still pending data chunks on
  the stream out wheel.
Approved by:	re@freebsd.org (Ken Smith)
2007-07-02 19:22:22 +00:00
Robert Watson
02dd4b5cbd Continue pre-7.0 privilege cleanup: update suser(9) comments to be priv(9)
comments.

Approved by:	re (bmah)
2007-07-02 15:44:30 +00:00
Robert Watson
bc6eca2432 Continue kernel privilege cleanup for 7.0: unstaticize suser_enabled and
stop declaring it in systm.h -- it's used only in kern_priv.c and is not
required elsewhere.

Approved by:	re (kensmith)
2007-07-02 14:03:29 +00:00
Ken Smith
2c5d31d556 ed(1) no longer relies on crypto library when built for the fixit media.
Approved by:	re (hrs)
2007-07-02 14:01:43 +00:00
Ken Smith
0c0146f019 Don't include encryption features of ed(1) when building for the
"rescue media" bundled with releases.

Suggested by:	ru
Approved by:	re (hrs)
2007-07-02 14:00:25 +00:00
Randall Stewart
b8709d23c5 - Add some needed error checking on bad fd passing in the sctp
syscalls.
Approved by:	re@freebsd.org (Ken Smith)
Obtained from:	Weongyo Jeong (weongyo.jeong@gmail.com)
2007-07-02 12:50:53 +00:00
Randall Stewart
602afc03e4 - Removes some incorrect error returns (errno was being overriden in
one of the functions)
- Fixes the error return of sctp_get_opt, it was returning the errno not
 -1.
Approved by:	re@freebsd.org (Robert Watson)
Obtained from:	Weongyo Jeong (weongyo.jeong@gmail.com)
2007-07-02 10:52:34 +00:00
Alan Cox
14137dc045 In the previous revision, when I replaced the unconditional acquisition
of Giant in vm_pageout_scan() with VFS_LOCK_GIANT(), I had to eliminate
the acquisition of the vnode interlock before releasing the vm object's
lock because the vnode interlock cannot be held when VFS_LOCK_GIANT() is
performed.  Unfortunately, this allows the vnode to be recycled between
the release of the vm object's lock and the vget() on the vnode.

In this revision, I prevent the vnode from being recycled by acquiring
another reference to the vm object and underlying vnode before releasing
the vm object's lock.

This change also addresses another preexisting but trivial problem.  By
acquiring another reference to the vm object, I also prevent the vm
object from being recycled.  Previously, the "vnodes skipped" counter
could be wrong because if it examined a recycled vm object.

Reported by:	kib
Reviewed by:	kib
Approved by:	re (kensmith)
MFC after:	3 weeks
2007-07-02 06:56:37 +00:00
Warner Losh
bf21ee8d91 WD Firewire/USB Combo hangs under load on USB interface. Fix with
these quirks.

Submitted by: John Pettitt
PR: 79140
Approved by: re@ (blanket)
2007-07-02 04:55:56 +00:00
George V. Neville-Neil
e66ff7fc8e Removing old, dead, KAME IPsec files as part of the move to the
new FAST_IPSEC based IPsec stack.

Approved by: re
Reviewed by: bz
2007-07-02 04:02:21 +00:00
Peter Wemm
ae259a3d16 Fix an annoying pointer/int cast warning that shows up on 64 bit systems.
Approved by:  re
2007-07-02 01:31:43 +00:00
Nate Lawson
a1ec53930b Revert previous commit, retaining cpufreq.
Approved by:	re (implicitly)
2007-07-01 22:19:20 +00:00
Nate Lawson
a7b811a620 Add cpufreq(4) to GENERIC. It does not change the frequency by default,
so systems should be relatively unaffected.  Users can then simply enable
powerd(8) in rc.conf to take advantage of it.

Approved by:	re
2007-07-01 21:47:45 +00:00
Robert Watson
536b405093 Remove two boot printfs generated by Audit to announce it's presence,
and replace with software-testable sysctl node (security.audit) that
can be used to detect kernel audit support.

Obtained from:	TrustedBSD Project
Approved by:	re (kensmith)
2007-07-01 20:51:30 +00:00
Andrew Thompson
c015bff644 The wicontrol(8) manpage is obsolete too.
Pointed out by:	Pawel Worach
Approved by:	re (rwatson)
2007-07-01 20:05:19 +00:00
Warner Losh
3702980c1c After talking with njl@, change this wildcard entry to be a bit less wild.
Approved by: re (blanket)
2007-07-01 17:42:07 +00:00
Ariff Abdullah
e5ad83a7e3 - Fix input/microphone support for ASUS A8N-VMCSM series.
Submitted by:	Simon Schubert <corecode@fs.ei.tum.de>

- Defer flushing unsolicited response into taskqueue thread rather
  than handle it directly in interrupt handler, since few of its
  operations (like measuring/calibrating jack impedance) are quite
  expensive.
- Misc. debugging cleanups.

Tested by:	joel
Approved by:	re (hrs)
MFC after:	3 days
2007-07-01 17:31:20 +00:00
Ariff Abdullah
6cf06ec6b1 Fix no-sound issues with ASUS A9T notebook.
Note: The offending quirk should have been made model/codec specific,
but since there were no records / log which model requires it, the quirk
logic had to be inverted (blacklist instead of whitelist).

Tested by:	Arkadiy Dudevitch <dudevitch@englerllc.com>
Approved by:	re (hrs)
MFC after:	3 days
2007-07-01 17:28:58 +00:00
George V. Neville-Neil
0d29af67f2 Fix a dangling netinet6 to netipsec transition for SCTP include files.
Approved by: re
2007-07-01 14:18:20 +00:00
George V. Neville-Neil
0a4583816b Remove a dangling file reference that is no longer needed with the removal
of KAME IPsec

Reviewed by:    bz
Approved by:    re
Supported by:   Secure Computing
2007-07-01 12:42:37 +00:00
Bjoern A. Zeeb
0831f32795 As part of KAME IPsec removal:
change the date to today instead of leaving the date when the patch was done.
Move the block to the top.

Approved by:	re (kensmith)
2007-07-01 12:31:27 +00:00
George V. Neville-Neil
adb0e1681f Follow on cleanup and removal of two unnecessary include files.
Reviewed by:    bz
Approved by:    re
Supported by:   Secure Computing
2007-07-01 12:31:01 +00:00
George V. Neville-Neil
8409aedfa6 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re
2007-07-01 12:08:08 +00:00
Andrey A. Chernov
5f308feb93 Switch to "-O1 -pipe" as cross-build compatible gcc workaround.
"Looks like Alexander chimed in with "I'm comfortable with that until we
can import a fixed GCC"."

Approved by:	re (kensmith)
2007-07-01 11:51:06 +00:00
George V. Neville-Neil
2cb64cb272 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes only the kernel files, the rest of the files
will follow in a second commit.

Reviewed by:    bz
Approved by:    re
Supported by:   Secure Computing
2007-07-01 11:41:27 +00:00
Andrew Thompson
069441f718 Remove wicontrol(8) from the base system. Using wicontrol to configure an
interface has been deprecated since 5.1, wi(4) wireless interfaces are managed
via the net80211 stack and ifconfig.

Approved by:	re (rwatson)
2007-07-01 10:25:07 +00:00
Christian Brueffer
62acbaf00a The driver will also first appear in 6.3. While here, fix some
grammar issues and capitalize Jumbo Frames.

Approved by:	re (blanket)
MFC after:	3 days
2007-07-01 09:42:47 +00:00