Commit Graph

152784 Commits

Author SHA1 Message Date
Konstantin Belousov
b9f180d1de When a vnode-backed vm object is referenced, it increments the vnode
reference count, and decrements it on dereference. If referenced object
is deallocated, object type is reset to OBJT_DEAD. Consequently, all
vnode references that are owned by object references are never released.
vunref() the vnode in vm object deallocation code for OBJT_VNODE
appropriate number of times to prevent leak.

Add an assertion to the vm_pageout() to make sure that we never get
reference on the vnode but then do not execute code to release it.

In collaboration with:	pho
Reviewed by:	alc
MFC after:	3 weeks
2010-01-17 21:26:14 +00:00
Konstantin Belousov
d2f334bfc9 Add new function vunref(9) that decrements vnode use count (and hold
count) while vnode is exclusively locked.

The code for vput(9), vrele(9) and vunref(9) is merged.

In collaboration with:	pho
Reviewed by:	alc
MFC after:	3 weeks
2010-01-17 21:24:27 +00:00
Ed Schouten
e35a88d3a6 Add forgotten break; keyword to getutxid().
We should not fall through to the ut_id comparison. Only ut_type should
be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME.
2010-01-17 21:00:29 +00:00
Michael Tuexen
cd55430963 Get rid of a lot of duplicated code for NR-SACK handle.
Generalize the SACK to code handle also NR-SACKs.
2010-01-17 21:00:28 +00:00
Randall Stewart
e34b217f91 Bug fix: If the allocation of a socket failed and we
freed the inpcb, it was possible to not set the
proper flags on the pcb (i.e. the socket is not there).
This is HIGHLY unlikely since no one else should be
able to find the socket.. but for consistency we
do the proper loop thing to make sure that we
mark the socket as gone on the PCB.
2010-01-17 19:47:59 +00:00
Marcel Moolenaar
d3e5c802a9 Unbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNS
level in that case.
2010-01-17 19:47:42 +00:00
Randall Stewart
0812a4d5e6 Pulls out another leaked windows ifdef that somehow
made its way through the scrubber.
2010-01-17 19:40:21 +00:00
Randall Stewart
a10c3242c7 This change syncs up the socketAPI stream-reset
values to match those in linux and the I-D
just released to the IETF.
2010-01-17 19:35:38 +00:00
Christian Brueffer
d298cb40c5 Small fixes. 2010-01-17 19:33:32 +00:00
Randall Stewart
92cf719944 More leaked ifdefs for APPLE and its mobility stuff. 2010-01-17 19:24:30 +00:00
Randall Stewart
33141385fc Remove another set of "leaked" ifdefs that somehow found
their way into FreeBSD.
2010-01-17 19:21:50 +00:00
Randall Stewart
58ac2d97b7 Remove strange APPLE define that leaked
through the scrubber scripts. Scripts are
now fixed so this won't happen again.
2010-01-17 19:17:16 +00:00
Ed Schouten
2c8d07a874 Fix a regression that was introduced in r191882.
I changed login_tty() to only work when the application is not a session
leader yet. This works fine for applications in the base system, but it
turns out various applications call this function after daemonizing,
which means they already use their own session.

If setsid() fails, just call tcsetsid() on the current session.
tcsetsid() will already perform proper security checks.

Reported by:	Oliver Lehmann
MFC after:	1 week
2010-01-17 17:52:35 +00:00
Ed Schouten
79a7dbf111 Simplify ttyslot(3).
After comparing how other systems deal with utmp/utmpx, I noticed many
systems don't even care about ttyslot(3) anymore, since utmpx doesn't
use TTY slots anyway. We don't provide any tools to access old utmp
files anymore, so there is no use in letting applications write to a
proper offset within the utmp file.

Just let ttyslot(3) always return 0, which seems to be the default
behaviour on operating systems like Linux as well.
2010-01-17 15:43:14 +00:00
Bjoern A. Zeeb
4dcc55a363 Garbage collect references to the no longer implemented tcp_fasttimo().
Discussed with:	rwatson
MFC after:	5 days
2010-01-17 13:07:52 +00:00
Bjoern A. Zeeb
592bcae802 Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control
whether to use source address selection (default) or the primary
jail address for unbound outgoing connections.

This is intended to be used by people upgrading from single-IP
jails to multi-IP jails but not having to change firewall rules,
application ACLs, ... but to force their connections (unless
otherwise changed) to the primry jail IP they had been used for
years, as well as for people prefering to implement similar policies.

Note that for IPv6, if configured incorrectly, this might lead to
scope violations, which single-IPv6 jails could as well, as by the
design of jails. [1]

Reviewed by:	jamie, hrs (ipv6 part)
Pointed out by:	hrs [1]
MFC After:	2 weeks
Asked for by:	Jase Thew (bazerka beardz.net)
2010-01-17 12:57:11 +00:00
Gavin Atkinson
f815125fbc Implement an "-x" option to cp(1), for compatibility with Linux and
feature parity with du(1) and similar:  When set, cp(1) will not traverse
mount points.

Initial patch by:       Graham J Lee   leeg teaching.physics.ox.ac.uk

PR:		bin/88056
Initial patch by: Graham J Lee   leeg teaching.physics.ox.ac.uk
Approved by:	ed (mentor)
MFC after:	1 month
2010-01-17 09:37:31 +00:00
Hajimu UMEMOTO
6c1e384c63 Remove the rules using 'me6'. Now, 'me' matches both any IPv6 address
and any IPv4 address configured on an interface in the system.

Reviewed by:	David Horn <dhorn2000__at__gmail.com>, luigi, qingli
MFC after:	2 weeks
2010-01-17 08:41:07 +00:00
Hajimu UMEMOTO
416458131a Change 'me' to match any IPv6 address configured on an interface in
the system as well as any IPv4 address.

Reviewed by:	David Horn <dhorn2000__at__gmail.com>, luigi, qingli
MFC after:	2 weeks
2010-01-17 08:39:48 +00:00
Xin LI
1750e4f8d7 Correct a typo (when we talk about offset, it should
be offset, not size).

Submitted by:	pluknet at gmail com
2010-01-17 08:12:28 +00:00
Xin LI
e192c6e8e8 Stripe offset may be usable even without stripe size known,
so give the output when either is non-zero.

Suggested by:	mav
2010-01-17 08:10:37 +00:00
Xin LI
35daa28f30 Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by:	pjd, mav (earlier version)
2010-01-17 06:20:30 +00:00
Marius Strobl
f212a61d5f Update the sparc64 hardware list regarding machines that will be supported
by 7.3-RELEASE.

Approved by:	blackend
MFC after:	3 days
2010-01-16 20:51:33 +00:00
Antoine Brodin
e493781a2c Update files to remove when MK_ZFS=no. 2010-01-16 20:42:50 +00:00
Antoine Brodin
af5b47240f Update files to remove when MK_CDDL=no. 2010-01-16 20:40:12 +00:00
Antoine Brodin
2ab199278f Add files to remove when MK_CALENDAR=no. 2010-01-16 20:36:27 +00:00
Michael Tuexen
5661a9ed70 Get rid of support of an old version of the SCTP-AUTH draft.
Get rid of unused MD5 code.

MFC after: 1 week
2010-01-16 20:04:17 +00:00
Antoine Brodin
abae4e8ac6 Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf
Submitted by:	bf
MFC after:	2 weeks
2010-01-16 17:08:22 +00:00
Ed Schouten
023b02dea7 Unexpose the old uname(3) function.
Nowadays uname(3) is an inline function around __xuname(3). Prevent
linkage of new binaries against this compatibility function, similar to
what I did with ttyslot(3).
2010-01-16 17:05:27 +00:00
Gavin Atkinson
86c18b3607 Fix HISTORY section to detail the history of the driver, not the man page.
Approved by:	ed (mentor, implicit)
2010-01-16 14:33:22 +00:00
Gavin Atkinson
f04fb828c4 Fix loader.conf(5) Xref
Approved by:	ed (mentor, implicit)
2010-01-16 14:32:02 +00:00
Gavin Atkinson
f3066f2be7 Xref sysctl(3)
Approved by:	ed (mentor)
2010-01-16 14:31:01 +00:00
Antoine Brodin
ca73e51342 regen
MFC after:	2 weeks
2010-01-16 12:27:15 +00:00
Attilio Rao
bf16ecdd2c Unbreak the build for pc98. Specify the newly introduced, for ia32,
DEV_ATPIC also for pc98.

Pointy hat to:	me
2010-01-16 12:24:12 +00:00
Antoine Brodin
622008b65d Unbreak world WITHOUT_NETGRAPH.
PR:		137487
Submitted by:	bf (previous version)
No objections:	net@
MFC after:	2 weeks
2010-01-16 12:20:26 +00:00
Edward Tomasz Napierala
b3f9d8c804 Add gmountver, disk mount verification GEOM class.
Note that due to e.g. write throttling ('wdrain'), it can stall all the disk
I/O instead of just the device it's configured for.  Using it for removable
media is therefore not a good idea.

Reviewed by:	pjd (earlier version)
2010-01-16 09:52:49 +00:00
Matt Jacob
78a235dd3f Amazingly we've been freeing a handle and using that which it refers to
for years. Bad!

MFC after:	1 week
2010-01-15 20:08:08 +00:00
Christian Brueffer
b5212e27ec Manpage for the siba(4) Sonic Inc. Silicon Backplane driver.
Submitted by:	weongyo
2010-01-15 19:34:40 +00:00
Pyun YongHyeon
261f04d654 Don't free mbuf chains when bge(4) fails to collapse the mbuf
chains. This part of code is to enhance performance so failing the
collapsing should not free TX frames. Otherwise bge(4) will
unnecessarily drop frames which in turn can freeze the network
connection.

Reported by:	Igor Sysoev (is <> rambler-co dot ru)
Tested by:	Igor Sysoev (is <> rambler-co dot ru)
2010-01-15 17:55:18 +00:00
Attilio Rao
a26cb6d547 Handling all the three clocks (hardclock, softclock, profclock) with the
LAPIC may lead to aliasing for softclock and profclock because frequencies
are sized in order to fit mainly hardclock.
atrtc used to take care of the softclock and profclock and it does still
do, if the LAPIC can't handle the clocks properly.

Revert the change when the LAPIC started taking charge of all three of
them and let atrtc handle softclock and profclock if not explicitly
requested. Such request can be made setting != 0 the new tunable
machdep.lapic_allclocks or if the new device ATPIC is not present
within the i386 kernel config (atrtc is linked to atpic presence).

Diagnosed by:	Sandvine Incorporated
Reviewed by:	jhb, emaste
Sponsored by:	Sandvine Incorporated
MFC:		3 weeks
2010-01-15 16:04:30 +00:00
Ruslan Ermilov
aa4a335bae Use the newly brought %U macro. 2010-01-15 16:01:22 +00:00
Alexander Leidinger
2883eb1ce1 Whitespace change to be able to provide the correct commit log for r202364:
---snip---
Add video clipping support but with the caveats below.

Background info:

Video clipping allows the user to provide either a series of clip rectangles
or a clip bitmap to the driver and have the driver mask the video according
to the clipping specs provided.

Adding support for clipping to the FreeBSD Linux emulator is problematic
because it seems that this feature is not supported by many drivers and
therefore it is ignored by many applications. Unfortunately, when not
using it, rather than passing in a null clipping list, some apps leave the
clipping fields uninitialized, casuing random values to be passed in. In
the case where the driver does not use the clipping info, this is not a
problem (although it is bad form). But the Linux emulator does not know
which drivers will use this and which won't, so the Linux emulator must
try to handle this clip list, and deal gracefully with cases where the
values seem to be uninitialized.

Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields
in the video_window structure: the integer clipcount and the pointer clips.

How the linuxulator handles this from this commit on:

    * if (clipcount == VIDEO_CLIP_BITMAP)
      The clips variable is a void * pointer to a 128*625 byte
      (1024*625 bit) memory area containing a bitmap of the clipping area.
      The pointer in the video_window structure is copied, but no
      video_clip structures are copied.
    * if (clipcount > 0 && clipcount <= 16384)
      The clips variable is pointer to a list of video_clip structures. Up
      to clipcount structures are copied and passed to the driver.
      The upper limit of 16384 was imposed here so that user code that does
      not properly initialize clipcount falls through below and no attempt
      is made to copy an uninitialized list. This value was found by
      examining Linux drivers that support the clip list.
    * else
      The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or
      positive (> 16384).
      All these cases are treated as invalid data. Both the clipcount field
      and clips pointer are forced to zero/NULL and passed to the driver.

It should be noted that, at the time of developing this V4L emulator code,
the pwc(4) V4L driver does not support clipping.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
MFC after:	1 month
---snip---
2010-01-15 15:38:31 +00:00
Ruslan Ermilov
18adde964d Pull up vendor changes. 2010-01-15 15:10:29 +00:00
Ruslan Ermilov
4083b9ac03 Cherry-pick unreleased vendor changes to mdoc:
: 2009-10-26  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (Dx): Define register.
:
: 2009-10-26  Jörg Sonnenberger  <joerg@britannica.bec.de>
:
:         Implement `%U' in mdoc for URL references.
:
:         * tmac/doc-common (%U): New register.
:         (Rd): Handle `doc-url-count' and `doc-url-name'.
:
:         * tmac/doc.tmac (doc-url-count, doc-url-name): New registers.
:         (doc-save-global-vars, doc-restore-global-vars, doc-reset-reference,
:         doc-print-reference): Handle `doc-url-count' and `doc-url-name'.
:         (%U): New macro.
:
:         * NEWS, tmac/groff_mdoc.man: Document `%U' macro.
:
: 2009-04-01  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc.tmac: Call `ec' before mapping characters.
2010-01-15 15:07:32 +00:00
Alexander Leidinger
0f6800b944 This is v4l support for the linuxulator. This allows to access FreeBSD
native devices which support the v4l API from processes running within
the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver.

Not tested is firmware upload, framebuffer stuff and video tuner stuff
due to lack of hardware.
The clipping part (VIDIOCSWIN) needs a little bit of further work (partly
in progress, but can not be tested due to lack of a suitable device).

The submitter tested this sucessfully with Skype and flash apps on amd64 and
i386 with the multimedia/pwcbsd driver.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
2010-01-15 14:58:19 +00:00
Ruslan Ermilov
1b2ef7353d Moved the doc-str-Lb-libulog string definition to where it belongs. 2010-01-15 14:05:06 +00:00
Ruslan Ermilov
4d433b8ccd Pull up vendor changes. The following local changes made obsolete:
- Addition of several FreeBSD versions.
- r192561 that attempted to fix UTF-8 issues.
2010-01-15 13:59:50 +00:00
Ruslan Ermilov
45d6d6c74a Cherry-pick some vendor changes to mdoc and man macro packages.
(They were all made before Groff switched from GPLv2 to GPLv3,
though the mdoc macro packages is not affected by the switch.)

: 2007-11-10  Michail Vidiassov  <master@iaas.msu.ru>
:
:         * tmac/doc-syms (doc-str-St--susv3): New string.
:         * tmac/groff_mdoc.man: Document it.
:
: 2008-09-06  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (Dd, Os, Dt): Reset `doc-command-name' to make
:         `.Nm' work properly if next manual page is printed.
:
: 2008-10-04  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (doc-operating-system-*): Update releases.
:
:         * tmac/groff_mdoc.man: Document it.
:
: 2008-10-13  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/groff_mdoc.man: Update documentation on BSD-like OS string
:         versions.
:
: 2008-10-16  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (doc-operating-system-*), tmac/groff_mdoc.man: Add
:         NetBSD 4.0.1.
:
: 2008-11-05  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/doc-common (Dt): Start a new page if necessary and set up
:         headers.
:
: 2008-12-24  Michail Vidiassov  <master@iaas.msu.ru>
:
:         * tmac/doc-common: Add entries for Mac OS X and FreeBSD.
:
: 2009-01-02  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/groff_mdoc.man: Update OS version string listing.
:
: 2009-01-03  Werner LEMBERG  <wl@gnu.org>
:
:         * tmac/an-old.tmac, tmac/doc.tmac: For -Tutf8, map \-, -, ', and `
:         conservatively to ASCII for the sake of easy cut and paste.
2010-01-15 13:48:29 +00:00
Olivier Houchard
59a5c7f90e Do not free the dmamap if it is still busy.
Submitted by:	Mark Tinguely
MFC after:	3 days
2010-01-15 12:39:48 +00:00
Ruslan Ermilov
0e96a56a89 Flatten out vendor tree. 2010-01-15 12:01:25 +00:00