Commit Graph

83706 Commits

Author SHA1 Message Date
Marcel Moolenaar
80f1c58b0a Fix double vision syndrome (read: double output) when in the
debugger without a panic.
2011-10-16 14:16:46 +00:00
Andre Oppermann
c8360ae220 Update the comment and description of tcp_sendspace and tcp_recvspace
to better reflect their purpose.
MFC after:	1 week
2011-10-16 13:54:46 +00:00
Ed Schouten
3fa417554b Forward declare mbuf and inpcb.
This fixes a compiler warning at WARNS=6 when including the header files
as follows:

	#include <sys/types.h>
	#include <netinet/in.h>
	#include <netinet/ip_var.h>
	#include <netinet/udp.h>
	#include <netinet/udp_var.h>
2011-10-16 10:58:00 +00:00
Ed Schouten
64995097dd Change ncp_scan_bindery_object() to pass a constant search string.
The ncp_scan_bindery_object() function does not modify search_string
internally, so there is no need to declare it as `char *'.
2011-10-16 08:44:03 +00:00
Nathan Whitehorn
007b7ee85c Enforce a memory barrier in stream operations, as is done on other
bus_space calls. This makes ath(4) work correctly on PowerPC.

Submitted by:	adrian
Tested by:	andreast
MFC after:	3 days
2011-10-15 23:15:55 +00:00
Christian Brueffer
32a1cc9317 Properly free resources in case of an error.
CID:		4222
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-15 22:27:35 +00:00
Eitan Adler
acdfc36a85 - add support for I-O DATA RSA-PCI2/R
PR:		kern/142999
Submitted by:	Takefu Kenji <takefu@airport.fm>
Approved by:	jhb
Approved by:	sahil (mentor)
MFC after:	1 week
2011-10-15 21:06:08 +00:00
Gleb Smirnoff
53883e0c24 Add support for IPv4 /31 prefixes, as described in RFC3021.
To run a /31 network, participating hosts MUST drop support
for directed broadcasts, and treat the first and last addresses
on subnet as unicast. The broadcast address for the prefix
should be the link local broadcast address, INADDR_BROADCAST.
2011-10-15 18:41:25 +00:00
Gleb Smirnoff
b365d954cc Remove last remnants of classful addressing:
- Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
- Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
- fix bug when we were not forwarding to a host which matches classful
  net address. For example router having 192.168.x.y/16 network attached,
  would not forward traffic to 192.168.*.0, which are legal IPs in
  CIDR world.
- For compatibility, leave autoguessing of mask based on class.

Reviewed by:	andre, bz, rwatson
2011-10-15 16:28:06 +00:00
Christian Brueffer
0ad684e7b4 Properly free resources in an error case.
CID:		4203
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-15 15:57:55 +00:00
Konstantin Belousov
126b36a21e Control the execution permission of the readable segments for
i386 binaries on the amd64 and ia64 with the sysctl, instead of
unconditionally enabling it.

Reviewed by:	marcel
2011-10-15 12:35:18 +00:00
Marius Strobl
2b6ae84b63 Merge from NetBSD:
- Remove clause 3 and 4 from TNF licenses.
- Fix memset usage.
- Various cleanup.
- Kill caddr_t.
2011-10-15 09:29:43 +00:00
Gleb Smirnoff
2a2e6f0aeb Never switch directly from INIT to MASTER, since this produces
nasty status flaps.

PR:		kern/161123
Submitted by:	Damien Fleuriot <dam my.gd>
OpenBSD:	ip_carp.c, rev. 1.115
2011-10-14 19:05:26 +00:00
John Baldwin
9860134635 Fix a typo in a comment. 2011-10-14 11:48:32 +00:00
John Baldwin
660d55fb88 Regen. 2011-10-14 11:47:14 +00:00
John Baldwin
f940342426 Use PAIR32TO64() for the offset and length parameters to
freebsd32_posix_fallocate() to properly handle big-endian platforms.

Reviewed by:	mdf
MFC after:	1 week
2011-10-14 11:46:46 +00:00
Adrian Chadd
cdd36f96b2 ath_pci PCI setup fixes.
* Break out the PCI setup override code into a new function.
* Re-apply the PCI overrides on powersave resume. The retry timeout
  register isn't currently being saved/resumed by the PCI driver/bus
  code.
2011-10-14 03:24:35 +00:00
Marcel Moolenaar
90fd594a1d Use PTRIN(). 2011-10-13 22:33:03 +00:00
Marius Strobl
1e5addb750 Merge from r225950:
Set the sense residual properly.

Reviewed by:	ken
2011-10-13 20:06:19 +00:00
Marcel Moolenaar
f8244106ab Wrap mprotect(2) so that we can add execute permissions when read
permissions are requested. This is needed on amd64 and ia64 for
JDK 1.4.x
2011-10-13 18:25:10 +00:00
Marcel Moolenaar
eb8afcd36a Wrap mprotect(2) 2011-10-13 18:21:11 +00:00
Marcel Moolenaar
488a16050c In freebsd32_mmap() and when compiling for amd64 or ia64, also
ask for execute permissions when read permissions are wanted.
This is needed for JDK 1.4.x on i386.
2011-10-13 18:18:42 +00:00
Bernhard Schmidt
a7978bab76 Fix bmiss notifications, events should be sent when NOT scanning.
MFC after:	3 days
2011-10-13 18:17:03 +00:00
Marcel Moolenaar
5f81660285 In sys_obreak() and when compiling for amd64 or ia64, when the process
is ILP32 (i.e. i386) grant execute permissions by default. The JDK 1.4.x
depends on being able to execute from the heap on i386.
2011-10-13 16:20:10 +00:00
Marcel Moolenaar
676eda08d0 In elf32_trans_prot() and when compiling for amd64 or ia64, add
PROT_EXECUTE when PROT_READ is needed. By default i386 allows
execution when reading is allowed and JDK 1.4.x depends on that.
2011-10-13 16:16:46 +00:00
Ed Schouten
97b48ffc93 Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
Gleb Smirnoff
d5378bb633 Use TAILQ_FOREACH() in the nd6_dad_find() instead of hand-rolled implementation. 2011-10-13 13:33:23 +00:00
Gleb Smirnoff
a0b5928b29 De-spl(9). 2011-10-13 13:30:41 +00:00
Gleb Smirnoff
b590b6ae80 Restore functions in6_ifaddloop() and in6_ifremloop() that were
inlined by Qing Li in his big new-ARP commit. I am going to utilize
them in my newcarp work, and also these functions left declared
in in6_var.h for all the time they were absent.

Reviewed by:	bz
2011-10-13 13:05:36 +00:00
Andrew Thompson
3cd6db794c Name these gpio pins better, they are on an external PLD and not the same as
the cpu wired gpio.
2011-10-12 20:58:54 +00:00
Andrew Thompson
bbdb7f2f2e Dont just set the pin high when turning on output, use the current value. Also
let this value be set when in input mode.
2011-10-12 20:57:21 +00:00
Navdeep Parhar
aa4b09c5c7 Make sure the inp wasn't dropped when rexmt let go of the inp and
pcbinfo locks.

Reviewed by:	andre@
MFC after:	7 days
2011-10-12 19:52:23 +00:00
Gleb Smirnoff
8d689e042f Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
John Baldwin
5d0d779b0e If an allocation for a specific resource range fails because it is not in
a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
ACPI system resource range.  If that works, permit the resource allocation
regardless.

MFC after:	1 week
2011-10-12 14:13:32 +00:00
Robert Watson
b160c14194 Correct a bug in export of capability-related information from the sysctls
supporting procstat -f: properly provide capability rights information to
userspace.  The bug resulted from a merge-o during upstreaming (or rather,
a failure to properly merge FreeBSD-side changed downstream).

Spotted by:     des, kibab
MFC after:      3 days
2011-10-12 12:08:03 +00:00
Adrian Chadd
eb29e5f70d Fix an unused variable warning/error when invariants isn't enabled.
Reported by:	bz
2011-10-12 10:19:55 +00:00
Adrian Chadd
df46ae53f6 Don't call fixup_filename() on each witness lock call.
This has been irking me for a while. This causes significant
CPU use on bottlenecked CPUs (eg my older EEEPC w/ an earlier
Celeron CPU and my MIPS24k boards) when they're passing
a lot of traffic.

Since the file/line values are only used for printing, this
should only affect display. It should have no operational
change on the code, besides reducing CPU use.
2011-10-12 09:21:02 +00:00
Marius Strobl
6aa1145c84 - Remove unused remnants of MII bitbang'ing.
- Sprinkle const.
2011-10-11 21:52:24 +00:00
Dag-Erling Smørgrav
c601ad8eeb Add a new trace point, KTRFAC_CAPFAIL, which traces capability check
failures.  It is included in the default set for ktrace(1) and kdump(1).
2011-10-11 20:37:10 +00:00
Kirk McKusick
cd795a6e1f When unmounting a filesystem always wait for the vfs_busy lock to clear
so that if no vnodes in the filesystem are actively in use the unmount
will succeed rather than failing with EBUSY.

Reported by: Garrett Cooper
Reviewed by: Attilio Rao and Kostik Belousov
Tested by:   Garrett Cooper
PR:          kern/161016
MFC after:   3 weeks
2011-10-11 18:46:41 +00:00
Christian Brueffer
796fa5e465 Add curly braces missed in r226247.
Pointy hat to:	brueffer
Submitted by:	many
MFC after:	1 week
2011-10-11 13:40:37 +00:00
Michael Tuexen
7906f59a29 Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.

MFC after: 3 days.
2011-10-11 13:24:37 +00:00
Christian Brueffer
05ad7ad667 Properly free linux_gidset in case of an error.
CID:		4136
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2011-10-11 10:32:23 +00:00
Edward Tomasz Napierala
5c0c5a182f Make unionfs also clear VAPPEND when clearing VWRITE, since VAPPEND
is just a modifier for VWRITE.

Submitted by:	rmacklem
2011-10-10 21:32:08 +00:00
Qing Li
15d2521975 All indirect routes will fail the rtcheck, except for a special host
route where the destination IP and the gateway IP is the same. This
special case handling is only meant for backward compatibility reason.
The last commit introduced a bug in the route check logic, where a
valid special case is treated as an error. This patch fixes that bug
along with some code cleanup.

Suggested by:	gleb
Reviewed by:	kmacy, discussed with gleb
MFC after:	1 day
2011-10-10 17:41:11 +00:00
Michael Tuexen
69c59f8ba2 Get struct sctp_net_route in tune with struct route.
struct route was changed in
http://svn.freebsd.org/changeset/base/225698
and since then SCTP support was broken.
This needs to be MFCed to stable/9 to unbreak SCTP support in 9.0
MFC after: 3 days.
2011-10-10 16:31:18 +00:00
Hans Petter Selasky
1984dc56b2 Add USB mass storage quirk for device that emits errors after the automatic
no synchronize cache detection.

Submitted by:	Scott Allendorf
MFC after:	3 days
2011-10-10 16:26:06 +00:00
Hans Petter Selasky
f6c6639af8 Bugfix: The ucom detach function is sometimes called on zeroed structures.
Check for this case and just return, so that the UCOM unit number zero is
not accidentially freed.

Submitted by:	Danish FreeBSD user at EuroBSDcon 2011
MFC after:	3 days
2011-10-10 15:54:44 +00:00
Konstantin Belousov
8be736b2b3 Do not ignore block offsets.
PR:	kern/160943
Submitted by:	Craig Boston <cb severious net>
Reviewed by:	Danny Braniss <danny cs huji ac il>
MFC after:	1 week
2011-10-10 13:26:53 +00:00
Michael Tuexen
3d2443cc84 When moving an stcb to a new inp and we copy over the list of
bound addresses, update the last used address pointer.
If not, it might result in a crash if the old inp goes away.

MFC after: 3 days.
2011-10-10 12:28:47 +00:00