Commit Graph

147151 Commits

Author SHA1 Message Date
Doug Rabson
e1899ef6c8 Add support for booting from raidz1 and raidz2 pools. 2009-05-16 10:48:20 +00:00
Christian Brueffer
e27fb776f3 Add a manpage for the bwi(4) driver. 2009-05-16 10:42:00 +00:00
Rick Macklem
15e8331f0e Fixed the Null callback RPCs so that they work with the new krpc. This
required two changes: setting the program and version numbers before
connect and fixing the handling of the Null Rpc case in newnfs_request().

Approved by:	kib (mentor)
2009-05-16 03:12:55 +00:00
Dag-Erling Smørgrav
433e2f4763 Remove do-nothing code that was required to dirty the old buffer on Alpha.
Coverity ID:	838
Approved by:	jhb, alc
2009-05-15 21:34:58 +00:00
Christian Brueffer
f633d09533 Add a missing break in a switch statement.
Found with:	Coverity Prevent(tm)
CID:		4302
MFC after:	2 weeks
2009-05-15 21:06:28 +00:00
Xin LI
216fa4c607 Reduce diff against my local version: replace malloc+memset() cases to calloc(). 2009-05-15 19:41:10 +00:00
Rick Macklem
0c794c5db1 Move the nfsstat structure and proc/op number definitions on the
experimental nfs subsystem from sys/fs/nfs/nfs.h and sys/fs/nfs/nfsproto.h
to sys/fs/nfs/nfsport.h and rename nfsstat to ext_nfsstat. This was done
so that src/usr.bin/nfsstat.c could use it alongside the regular nfs
include files and struct nfsstat.

Approved by:	kib (mentor)
2009-05-15 19:33:59 +00:00
Konstantin Belousov
0e9bd89d7d Devfs replaces file ops vector with devfs-specific one in devfs_open(),
before the struct file is fully initialized in vn_open(), in particular,
fp->f_vnode is NULL. Other thread calling file operation before f_vnode
is set results in NULL pointer dereference in devvn_refthread().

Initialize f_vnode before calling d_fdopen() cdevsw method, that might
set file ops too.

Reported and tested by:	Chris Timmons <cwt networks cwu edu>
	(RELENG_7 version)
MFC after:	3 days
2009-05-15 19:23:05 +00:00
John Baldwin
7293f0e67c Update the KVM backend for malloc stats to catch up to the internal structure
BI change from the addition of DTrace malloc(9) probes.

Submitted by:	Ben Kelly  ben of wanderview dot com
2009-05-15 18:25:44 +00:00
Warner Losh
b8f5836a3c The module name convention is foo, not if_foo. 2009-05-15 17:02:11 +00:00
Warner Losh
16dcc9ce77 Cleanup module declarations:
Use "bwi" consistently
	No need to have separate cardbus attachment
	No need to declare a module version
2009-05-15 16:38:42 +00:00
Rick Macklem
d34b41c9c2 Modify the diskless booting code in sys/fs/nfsclient to be compatible
with what is in sys/nfsclient, so that it will at least build now.

Approved by:	kib (mentor)
2009-05-15 16:03:11 +00:00
Konstantin Belousov
6b72d8db47 Revert r192094. The revision caused problems for sysctl(3) consumers
that expect that oldlen is filled with required buffer length even when
supplied buffer is too short and returned error is ENOMEM.

Redo the fix for kern.proc.filedesc, by reverting the req->oldidx when
remaining buffer space is too short for the current kinfo_file structure.
Also, only ignore ENOMEM. We have to convert ENOMEM to no error condition
to keep existing interface for the sysctl, though.

Reported by:	ed, Florian Smeets <flo kasimir com>
Tested by:	pho
2009-05-15 14:41:44 +00:00
Ed Schouten
983d12f39b Turn consolectl into a simple device node, not a TTY.
Apart from the 16 virtual terminals, Syscons allocates two device nodes
that should not really be TTYs, even though they are. One of them is
consolectl. In RELENG_7 and before, these device nodes are used in
single user mode. After I simplified input path, we only use this device
node to call ioctl() on (moused, Xorg, vidcontrol).

When you call ioctl() on consolectl, it will behave the same as being
called on the first window.
2009-05-15 14:30:37 +00:00
Christian Brueffer
a9754a7538 This driver can be loaded as a module now.
MFC after:	3 days
2009-05-15 13:26:54 +00:00
Christian Brueffer
7042d35782 Xref missing wlan drivers. 2009-05-15 10:11:54 +00:00
Christian Brueffer
ca23ba6e2e Sort SEE ALSO section, remove trailing dot. 2009-05-15 10:06:33 +00:00
Warner Losh
940672949e Fix name for driver to assign to the SPI device. 2009-05-15 04:49:20 +00:00
Alan Cox
42eb41087c Eliminate unnecessary clearing of the page's dirty mask from various
getpages functions.

Eliminate a stale comment.
2009-05-15 04:33:35 +00:00
Colin Percival
6262c79b70 Allow a comma-separated list of network interfaces to be specified via the
netDev option in install.cfg.

Submitted by:	randi
MFC after:	1 week
2009-05-15 00:18:31 +00:00
Xin LI
718d3b2852 As the comment says, close() frees the variable, record. So we obtain
the length by evaluating the value from the copy, cbuf instead.  This
fixes a crash caused by previous commit (use-after-free)

Submitted by:	Dimitry Andric <dimitry andric com>
Pointy hat to:	delphij
2009-05-14 23:09:33 +00:00
Xin LI
9fe569d8f9 Some comment/space changes (FALLTHRU -> FALLTHROUGH, space after while). 2009-05-14 22:36:56 +00:00
Xin LI
25e13e6895 Try to workaround a race where bge_stop() may sneak in when bge_rxeof()
drops and re-grabs the softc mutex in the middle, resulting in kernel
trap 12.  This may happen when a lot of traffic is being hammered on
one bge(4) interface while the system is shutting down.

Reported by:	Alexander Sack <pisymbol gmail com>
PR:		kern/134548
MFC After:	2 weeks
2009-05-14 22:33:37 +00:00
John Baldwin
3e829b18d6 - Use a separate sx lock to try to limit the number of concurrent userland
sysctl requests to avoid wiring too much user memory.  Only grab this
  lock if the user's old buffer is larger than a page as a tradeoff to
  allow more concurrency for common small requests.
- Just use a shared lock on the sysctl tree for user sysctl requests now.

MFC after:	1 week
2009-05-14 22:01:32 +00:00
John Baldwin
76dae09449 Trim the default set of device hints on i386 and amd64:
- Remove vga0 and the disabled uart2/uart3 hints from both platforms.
- Remove hints for ISA adv0, bt0, aha0, aic0, ed0, cs0, sn0, ie0, fe0, and
  le0 from i386.  All these hints were marked 'disabled' and thus already
  did not work "out of the box".

Discussed with:	imp
2009-05-14 21:53:35 +00:00
Rick Macklem
98ad44534e Apply changes to the experimental nfs server so that it uses the security
flavors as exported in FreeBSD-CURRENT. This allows it to use a
slightly modified mountd.c instead of a different utility.

Approved by:	kib (mentor)
2009-05-14 21:39:08 +00:00
Robert Watson
6d888973c8 Staticize two functions not used outside of in_pcb.c: in_pcbremlists() and
db_print_inpcb().

MFC after:	1 month
2009-05-14 20:59:36 +00:00
Rick Macklem
cec6336717 Change the file names in the comments in sys/fs/nfs/nfs_var.h so
that they are the names used in FreeBSD-CURRENT. Also shuffled a
few entries around, so that they under the correct comment.

Approved by:	kib (mentor)
2009-05-14 20:39:09 +00:00
Attilio Rao
120b18d86f FreeBSD right now support 32 CPUs on all the architectures at least.
With the arrival of 128+ cores it is necessary to handle more than that.
One of the first thing to change is the support for cpumask_t that needs
to handle more than 32 bits masking (which happens now).  Some places,
however, still assume that cpumask_t is a 32 bits mask.
Fix that situation by using always correctly cpumask_t when needed.

While here, remove the part under STOP_NMI for the Xen support as it
is broken in any case.

Additively make ipi_nmi_pending as static.

Reviewed by:	jhb, kmacy
Tested by:	Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
2009-05-14 17:43:00 +00:00
Maksim Yevmenkin
b7ced94c8c Avoid floating point arithmetic while calculating iquiry length.
Submitted by:	Iain Hibbert < plunky -at- rya-online -dot- net >
MFC after:	1 week
2009-05-14 17:10:19 +00:00
Rafal Jaworowski
a72778d6fa Improve style(9) 2009-05-14 16:56:56 +00:00
Rafal Jaworowski
7ad9c533ef PowerPC common SMP startup and time base rework.
- make mftb() shared, rewrite in C, provide complementary mttb()
- adjust SMP startup per the above, additional comments, minor naming
  changes
- eliminate redundant TB defines, other minor cosmetics

Reviewed by:	marcel, nwhitehorn
Obtained from:	Freescale, Semihalf
2009-05-14 16:48:25 +00:00
Sam Leffler
95b0b37cfc add missing type for SYSCTL_PROC items; w/o a type you can view the value
but not change it
2009-05-14 16:25:57 +00:00
Sam Leffler
70ca3d6a9f correct handling of ctl frames: the sender's address is always i_addr2 for
frames we should expect to process (old code was trying to handle frames
we should never see--like ACK)

Reviewed by:	thompsa, cbzimmer
2009-05-14 16:23:24 +00:00
Yoshihiro Takahashi
85d12e2316 MFi386: revision 192050
Implement simple machine check support.
2009-05-14 16:01:29 +00:00
John Baldwin
bb2aebf3ad - Add a void pointer to the ata-pci controller softc to allow
chipset-specific code to attach chipset-specific data.
- Use chipset-specific data in the acard and promise chipsets rather than
  changing the ivars of ATA PCI devices.  ivars are reserved for use by the
  parent bus driver and are _not_ available for use by devices directly.
  This fixes a panic during sysctl -a with certain Promise controllers with
  ACPI enabled.

Reviewed by:	mav
Tested by:	Magnus Kling (kingfon @ gmail) (on 7)
MFC after:	3 days
2009-05-14 14:57:13 +00:00
Christian Brueffer
3af3ff479b Compare the correct variable against NULL.
Reviewed by:	scottl
Found with:	Coverity Prevent(tm)
CID:		821
MFC after:	2 weeks
2009-05-14 13:32:33 +00:00
Robert Watson
54d83191b0 Remove usb_ethersubr.c missed reference -- we don't build ousb
with LINT, so the tinderbox didn't pick this up.
2009-05-14 12:39:22 +00:00
Konstantin Belousov
e401a6a54e Do not advance req->oldidx when sysctl_old_user returning an
error due to copyout failure or short buffer.

The later breaks the usermode iterators of the sysctl results that pack
arbitrary number of variable-sized structures. Iterator expects that
kernel filled exactly oldlen bytes, and tries to interpret half-filled
or garbage structure at the end of the buffer. In particular,
kinfo_getfile(3) segfaulted.

Reported and tested by:	pho
MFC after:	3 weeks
2009-05-14 10:54:57 +00:00
Christian Brueffer
bf15937833 Remove an unused variable.
Found with:	Coverity Prevent(tm)
CID:		1167
2009-05-14 09:28:02 +00:00
Craig Rodrigues
3f7dc796e8 Set crashinfo_enable to "YES" by default.
During bootup, if /etc/rc.d/savecore detects a core dump file
on the dump device, the core file will be saved, and the crashinfo
script will be run to generate a human-readable report.

This will make it easier for end-users to provide feedback to
developers about kernel crashes.

Reviewed by:	jhb
2009-05-14 08:26:20 +00:00
Qing Li
92fac99477 Ignore the INADDR_ANY address inserted/deleted by DHCP when installing a loopback route
to the interface address.
2009-05-14 05:27:09 +00:00
Kip Macy
8222d237cb Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit 2009-05-14 03:33:04 +00:00
Jeff Roberson
bf422e5f27 - Implement a lockless file descriptor lookup algorithm in
fget_unlocked().
 - Save old file descriptor tables created on expansion until
   the entire descriptor table is freed so that pointers may be
   followed without regard for expanders.
 - Mark the file zone as NOFREE so we may attempt to reference
   potentially freed files.
 - Convert several fget_locked() users to fget_unlocked().  This
   requires us to manage reference counts explicitly but reduces
   locking overhead in the common case.
2009-05-14 03:24:22 +00:00
Nathan Whitehorn
b40ce02a2f Factor out platform dependent things unrelated to device drivers into a
new platform module. These are probed in early boot, and have the
responsibility of determining the layout of physical memory, determining
the CPU timebase frequency, and handling the zoo of SMP mechanisms
found on PowerPC.

Reviewed by:	marcel, raj
Book-E parts by: raj
2009-05-14 00:34:26 +00:00
Dag-Erling Smørgrav
e872228f51 Snip redundant assignment.
Approved by:	scottl
MFC after:	2 weeks
Coverity ID:	3863
2009-05-13 22:31:25 +00:00
Rick Macklem
a770e183dd Apply a one line change to nfs_clbio.c (which is largely a copy
of sys/nfsclient/nfs_bio.c) to track the change recently committed
by acl for nfs_bio.c.

Approved by:	kib (mentor)
2009-05-13 21:18:34 +00:00
Stanislav Sedov
18f799c8fd - Set MAC address in ateinit, so it can be changed later. 2009-05-13 21:01:10 +00:00
Stanislav Sedov
24756cad5d - Style(9) and consistency nitpicking.
Reviewed by:	imp
2009-05-13 20:29:53 +00:00
Ed Schouten
aa16f86ca5 Keep this line shorter than 80 columns. 2009-05-13 19:29:50 +00:00