rodrigc [Fri, 5 Jan 2007 05:50:36 +0000 (05:50 +0000)]
MFC 1.14, 1.15:
marcel 2006-12-21 05:40:46 UTC
Unbreak 64-bit little-endian systems that do require alignment.
The fix involves using le16dec(), le32dec(), le16enc() and
le32enc(). This eliminates invalid casts and duplicated logic.
PR: 106703
Tested by: Axel Gonzalez <loox e-shell net>
kib [Thu, 4 Jan 2007 17:39:17 +0000 (17:39 +0000)]
MFC of rev. 1.164:
- Conditionally acquire Giant in mdstart_vnode(), mdcreate_vnode(), and
mddestroy() only if the file is from a non-MPSAFE fs.
There, to accommodate for the vn_open() difference with HEAD, use
VFS_LOCK_GIANT after vn_open (since vn_open(..., -1) assumes caller is not
MP-safe).
- No longer unconditionally hold Giant in the md kthread for vnode-backed
kthreads.
- Improve the handling of the thread exit race when destroying an md
device.
mohans [Wed, 3 Jan 2007 20:19:02 +0000 (20:19 +0000)]
MFC 3 fixes from -current. All having to do with the case where the same
filehandle is looked up by 2 or more processes.
- Don't vrele() the losing vnode, as vfs_hash_insert() vput()'s it.
- Initialize mutexes on the losing nfsnode (as these get destroyed in the
nfsnode reclaim path).
- Move the initialization of the filehandle to before the vfs_insert, to
close some races which could result in multiple vnodes for the same
filehandle being inserted into the hash.
flz [Tue, 2 Jan 2007 11:14:07 +0000 (11:14 +0000)]
Jail_ip and jail_interface local variables were renamed to _ip and _interface
in a previous commit to avoid namespace collisions, unfortunately I missed two
of them. This leads to the ip alias being incorrectly removed in some cases
when using the stop command.
Reported by: Philipp Wuensche <cryx-freebsd@h3q.com>
ceri [Sun, 31 Dec 2006 18:28:46 +0000 (18:28 +0000)]
MFC revisions 1.90, 1.91 and 1.93:
1.90: Fix typos in comments.
1.91: Add /lib and /libexec to the list of directories that have the
schg flag removed prior to an upgrade.
1.93: Fix a pair of user-visible typos.
rwatson [Sat, 30 Dec 2006 16:03:44 +0000 (16:03 +0000)]
Merge tcp_subr.c:1.251 from HEAD to RELENG_6:
Fix race conditions on enumerating pcb lists by moving the initialization
(and where appropriate the destruction) of the pcb mutex to the
init/finit functions of the pcb zones. This allows locking of the pcb
entries and race condition free comparison of the generation count.
Rearrange locking a bit to avoid extra locking operation to update the
generation count in in_pcballoc(). (in_pcballoc now returns the pcb
locked)
I am planning to convert pcb list handling from a type safe to a
reference count model soon. (As this allows really freeing the PCBs)
Reviewed by: rwatson, mohans
This was missed in jhb's earlier MFC, and lead to a panic when creating
TCP sockets.
Reported by: Larry Rosenman <ler at lerctr dot org>
Henrik Brix Andersen <henrik at brixandersen dot dk>
Karol Kwiatkowski <freebsd at orchid dot homeunix dot org>
Danny Braniss <danny at cs dot huji dot ac dot il>
Torfinn Ingolfsen <torfinn dot ingolfsen at broadpark dot no>
jhb [Fri, 29 Dec 2006 19:25:49 +0000 (19:25 +0000)]
MFC: Close some races between enumerating inpcb's and tearing them down by
making the mutex portion of struct inpcb type-stable and never destroying
it.
jhb [Thu, 28 Dec 2006 22:09:47 +0000 (22:09 +0000)]
MFC:
- Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the
various pcib drivers to use their own private devclass_t variables for
their modules.
- Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib
drivers while I'm here.
yar [Wed, 27 Dec 2006 06:22:44 +0000 (06:22 +0000)]
MFC:
Allow for module-path being a semicolon-separated list of dirs.
This is consistent with kern.module_path sysctl and also compensates
for the unconventional syntax of asf(8) where the last of multiple
arguments is the output file, which prevents us from using the
traditional Unix syntax "foo file ..." to specify multiple module
dirs.
dds [Tue, 26 Dec 2006 20:09:40 +0000 (20:09 +0000)]
MFC revisions 1.35-1.37.
Correct handling of format strings with escaped % specifications.
Prevent buffer overflow when forcibly terminating an escape character.
marius [Tue, 26 Dec 2006 09:45:19 +0000 (09:45 +0000)]
MFC: 1.7
Fix a typo in __fpu_ftox() that caused long double to long (and long long)
conversion of negative numbers to always result in -1.
While at it, rearrange the nearby comment so it fits in 80 chars per line,
like the rest of this file does.
cperciva [Tue, 26 Dec 2006 05:27:49 +0000 (05:27 +0000)]
MFC revisions 1.68-1.71 of bsdtar.c, 1.25 of bsdtar.h:
* Remove nonexistant -F option from getopts string.
* Correct the names of some options.
* Check for -U and --strip-components options in inappropriate contexts.
scottl [Thu, 21 Dec 2006 21:53:54 +0000 (21:53 +0000)]
Partially back out revs 1.134 and 1.50 of if_bge.c and if_bgereg.h,
respectively. A lot more is needed to support these chips than just PCI
IDs, and the code added to 7-CURRENT isn't ready for FreeBSD 6 yet.
mbr [Thu, 21 Dec 2006 16:24:22 +0000 (16:24 +0000)]
MFC Rev. 1.267
Retest tp->t_session because Giant might have been temporarily dropped
while waiting for proctree_lock, allowing for an intervening tty_close()
that cleared tp->t_session.
yongari [Thu, 21 Dec 2006 12:57:06 +0000 (12:57 +0000)]
MFC if_rl.c, 1.166 to RELENG_6.
Don't assume IF_LLADDR returns aligned memory address.
Because accessing ID registers in rtl81x9 needs 32bit register access
and RL_IDR6/RL_IDR7 registers are reservered registers bzero() is
needed before copying ethernet address.
This fixes unaligned memory accesses panic in sparc64.
yar [Wed, 20 Dec 2006 12:29:40 +0000 (12:29 +0000)]
MFC rev. 1.18:
Improve cleartmp in a number of aspects:
+ Use rc.subr(8) features properly.
+ Do the whole job of obliterating /tmp contents in find(1).
+ Leave lost+found and quota.{user,group} in /tmp only if root-owned.
+ Make the overall structure clearer by first removing the X dirs
(perhaps along with the rest of /tmp) and then re-creating them.
+ Use "find -exec rm -rf {} +" for efficiency: each rm instance gets
a chance to kill as much files in /tmp as ARG_MAX permits.
imp [Fri, 15 Dec 2006 21:33:23 +0000 (21:33 +0000)]
Directly commit a compatibility shim for -current.
bus_get_dma_tag(dev) in stable is spelled NULL presently. Until such
time as we MFC this functionailty (which may be never), provide this
alternate spelling to aide in back-porting -current drivers. When the
functionality is merged, this can be retired.