]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r207094 (by marcel):
ae [Thu, 24 Jun 2010 05:52:44 +0000 (05:52 +0000)]
MFC r207094 (by marcel):
Implement the resize verb and add support for resizing partitions
for all schemes but EBR.

MFC r207095 (by marcel):
Implement the resize command for resizing partitions. Without new
size, the partition in question is resized to fill all available
space.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208647,r208654: Clarify devfs manpages slightly.
jilles [Wed, 23 Jun 2010 20:59:00 +0000 (20:59 +0000)]
MFC r208647,r208654: Clarify devfs manpages slightly.

mount(8): add xref to devfs(5)
devfs(5): change example to something more likely to be useful (it is not
necessary to mount a devfs on /dev manually, but for chroots/jails it is
often needed), mention since when devfs is preferred to device nodes on ufs
and when device nodes on ufs stopped working

PR: 146600

git-svn-id: svn://svn.freebsd.org/base/stable/8@209484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoHoist mergeinfo for sys/geom/sched up to sys.
jhb [Wed, 23 Jun 2010 19:28:36 +0000 (19:28 +0000)]
Hoist mergeinfo for sys/geom/sched up to sys.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoHoist mergeinfo for sys/dev/ixgbe up to sys.
jhb [Wed, 23 Jun 2010 19:22:38 +0000 (19:22 +0000)]
Hoist mergeinfo for sys/dev/ixgbe up to sys.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209479 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 198988:
jhb [Wed, 23 Jun 2010 18:46:10 +0000 (18:46 +0000)]
MFC 198988:
Take a step towards removing if_watchdog/if_timer.  Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 208390:
jhb [Wed, 23 Jun 2010 18:00:19 +0000 (18:00 +0000)]
MFC 208390:
Allow a const char * to be passed as the process name to kproc_kthread_add()
without generating a warning.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 208388:
jhb [Wed, 23 Jun 2010 17:56:20 +0000 (17:56 +0000)]
MFC 208388:
- Set 'dmadat' earlier so that we properly setup the heap if we fail to
  locate a high memory area for the heap using the SMAP.
- Read the number of hard drive devices from the BIOS instead of hardcoding
  a limit of 128.  Some BIOSes duplicate disk devices once you get beyond
  the maximum drive number.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 209213:
jhb [Wed, 23 Jun 2010 17:04:42 +0000 (17:04 +0000)]
MFC 209213:
When updating individual CPU's lowest Cx state to use, never set it to a
state lower than the lowest one supported by the current CPU.  This closes
some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx
states for individual CPUs were changing (e.g. unplugging the AC adapter
of a laptop) that could result in panics.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209369:
nwhitehorn [Wed, 23 Jun 2010 13:13:14 +0000 (13:13 +0000)]
MFC r209369:

Temporarily disable instruction relocation while setting up the kernel's
IBAT entry in early boot in order to prevent possible faults from races
between the instruction cache and the MMU.

PR: powerpc/148003

git-svn-id: svn://svn.freebsd.org/base/stable/8@209464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208920:
kib [Wed, 23 Jun 2010 10:06:57 +0000 (10:06 +0000)]
MFC r208920:
Reorganize the code in bdwrite() which handles move of dirtiness from
the buffer pages to buffer. Drain the VPO_BUSY bit of the buffer pages
before setting valid and clean bits.

Stable/8 version of vfs_page_set_validclean() requires page queue lock.

Tested by: pho

git-svn-id: svn://svn.freebsd.org/base/stable/8@209459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 209286:
dougb [Tue, 22 Jun 2010 21:12:44 +0000 (21:12 +0000)]
MFC 209286:

Add the AAAA address for i.root-servers.net

git-svn-id: svn://svn.freebsd.org/base/stable/8@209448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209341:
mav [Tue, 22 Jun 2010 19:24:07 +0000 (19:24 +0000)]
MFC r209341:
Report transport type in XPT_PATH_INQ.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209340:
mav [Tue, 22 Jun 2010 19:22:34 +0000 (19:22 +0000)]
MFC r209340:
Report transport type in XPT_PATH_INQ.

PR: i386/147929

git-svn-id: svn://svn.freebsd.org/base/stable/8@209438 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r198478 (by lulf):
ae [Tue, 22 Jun 2010 18:24:26 +0000 (18:24 +0000)]
MFC r198478 (by lulf):
- Initialize variable in order to avoid GCC warning and enable WARNS=6.

PR: bin/139970
Submitted by: Ulrich Spörlein <uqs -at- spoerlein.net>
Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209434 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agomerge r196650 (check that tty != NULL, prevents segfault on session close)
des [Tue, 22 Jun 2010 15:01:23 +0000 (15:01 +0000)]
merge r196650 (check that tty != NULL, prevents segfault on session close)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r198235:
ae [Tue, 22 Jun 2010 09:45:20 +0000 (09:45 +0000)]
MFC r198235:
Clean up markup (mainly).

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209199:
kib [Tue, 22 Jun 2010 08:58:13 +0000 (08:58 +0000)]
MFC r209199:
Fix the syscall module name after r205320.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208672: g_label: fix possible NULL pointer dereference
avg [Tue, 22 Jun 2010 08:17:20 +0000 (08:17 +0000)]
MFC r208672: g_label: fix possible NULL pointer dereference

git-svn-id: svn://svn.freebsd.org/base/stable/8@209423 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208670: amdsbwd: fix nonsensical timeout calculations
avg [Tue, 22 Jun 2010 07:55:30 +0000 (07:55 +0000)]
MFC r208670: amdsbwd: fix nonsensical timeout calculations

git-svn-id: svn://svn.freebsd.org/base/stable/8@209418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208669: zfs boot: fix error handling in zfs_readdir
avg [Tue, 22 Jun 2010 07:54:19 +0000 (07:54 +0000)]
MFC r208669: zfs boot: fix error handling in zfs_readdir

git-svn-id: svn://svn.freebsd.org/base/stable/8@209417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r207178:
ae [Tue, 22 Jun 2010 07:38:30 +0000 (07:38 +0000)]
MFC r207178:
Fix undo for schemes that have internal partitions. Internal partitions
do not constitute user-visible or active partitions and as such should
not prevent undoing pending operations.

While here, initialize the last usable sector for the placeholder geom
based on the null scheme, created to allow undoing the destruction of
a scheme. This gives consistent output with "gpart show".

Approved by: mav (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 209188
mjacob [Tue, 22 Jun 2010 04:40:50 +0000 (04:40 +0000)]
This is an MFC of 209188

For the target port groups structures, don't allocate the initial element.
This makes things easier for target implementations to calculate how many
elements they need to allocate.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208918
mjacob [Tue, 22 Jun 2010 04:38:41 +0000 (04:38 +0000)]
This is an MFC of 208918

One byte off for scsi_target_group cdb.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208905
mjacob [Tue, 22 Jun 2010 04:37:05 +0000 (04:37 +0000)]
This is an MFC of 208905

Make additional definitions up to and including SPC-4. Add in definitions
for REPORT and SET TARGET PORT GROUP commands (foundations for future work).

Regularize opcodes to be upper case hex.

Pick *one* of tab or space after #define (tab) and stick with that.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r209191
rmacklem [Tue, 22 Jun 2010 01:30:46 +0000 (01:30 +0000)]
MFC: r209191
Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208969,209268:
delphij [Mon, 21 Jun 2010 22:00:57 +0000 (22:00 +0000)]
MFC r208969,209268:

Driver update of twa(4) from LSI.  Many thanks to LSI for continuing to
support FreeBSD.

  1) Timeout ioctl command timeouts.
       Do not reset the controller if ioctl command completed
       successfully.
  2) Remove G66_WORKAROUND code (this bug never shipped).
  3) Remove unnecessary interrupt lock (intr_lock).
  4) Timeout firmware handshake for PChip reset (don't wait forever).
  5) Handle interrupts inline.
  6) Unmask command interrupt ONLY when adding a command to the pending
     queue.
  7) Mask command interrupt ONLY after removing the last command from
     the pending queue.
  8) Remove TW_OSLI_DEFERRED_INTR_USED code.
  9) Replace controller "state" with separate data fields to avoid races:

       TW_CLI_CTLR_STATE_ACTIVE                     ctlr->active
       TW_CLI_CTLR_STATE_INTR_ENABLED               ctlr->interrupts_enabled
       TW_CLI_CTLR_STATE_INTERNAL_REQ_BUSY          ctlr->internal_req_busy
       TW_CLI_CTLR_STATE_GET_MORE_AENS              ctlr->get_more_aens
       TW_CLI_CTLR_STATE_RESET_IN_PROGRESS          ctlr->reset_in_progress
       TW_CLI_CTLR_STATE_RESET_PHASE1_IN_PROGRESS   ctlr->reset_phase1_in_progress

 10) Fix "req" leak in twa_action() when simq is frozen and req is NOT
     null.
 11) Replace softc "state" with separate data fields to avoid races:
       TW_OSLI_CTLR_STATE_OPEN                      sc->open
       TW_OSLI_CTLR_STATE_SIMQ_FROZEN               sc->simq_frozen
 12) Fix reference to TW_OSLI_REQ_FLAGS_IN_PROGRESS in
     tw_osl_complete_passthru()
 13) Use correct CAM status values.
       Change CAM_REQ_CMP_ERR to CAM_REQ_INVALID.
       Remove use of CAM_RELEASE_SIMQ for physical data addresses.
 14) Do not freeze/ release the simq with non I/O commands.
       When it is appropriate to temporarily freeze the simq with an I/O
       command use:
         xpt_freeze_simq(sim, 1);
         ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
       otherwise use:
         xpt_freeze_simq(sim, 1);
         xpt_release_simq(sim, 1);

Submitted by: Tom Couch <tom.couch lsi.com>
PR: kern/147695

git-svn-id: svn://svn.freebsd.org/base/stable/8@209404 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209122:
kaiw [Mon, 21 Jun 2010 13:47:29 +0000 (13:47 +0000)]
MFC r209122:

  * Improve compatibility with existing application code by permitting the
    use of `elf_getbase()` on non-archive members. This change is needed
    for gcc LTO (-flto) to work properly.
  * Style fix: paranthesize returned values.
  * Document the current behaviour of `elf_getbase()`.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208886:
ae [Mon, 21 Jun 2010 05:42:36 +0000 (05:42 +0000)]
MFC r208886:

libgeom(3) does strdup of param name.
Don't leak memory when deleting param from gctl_req.

Approved by: mav (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208895.
mjacob [Mon, 21 Jun 2010 04:37:39 +0000 (04:37 +0000)]
This is an MFC of 208895.

Fix XPT_GET_TRAN_SETTING for FC which has been broken for while so that
it will figure out the correct target to handle index and be able to find
things like WWPN, etc.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209155:
mav [Sun, 20 Jun 2010 10:23:46 +0000 (10:23 +0000)]
MFC r209155:
Fix bug introduced in SVN rev 194985. When calling pic_assign_cpu()
for pre-bound IRQs during boot, submit there LAPIC ID, same as in other
places, not CPU ID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFH r200600: Clarify what's meant by NUL for getline.3
uqs [Sat, 19 Jun 2010 18:38:03 +0000 (18:38 +0000)]
MFH r200600: Clarify what's meant by NUL for getline.3

PR: docs/141125
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@209349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC revs 209026 and 209085:
marcel [Sat, 19 Jun 2010 04:57:58 +0000 (04:57 +0000)]
MFC revs 209026 and 209085:
o   Bump MAX_BPAGES from 256 to 1024.
o   Synchronize the kernel entry on all CPUs with the use of the ptc.g
    instruction on a single CPU by implementing a bare-bones readers-
    writer lock.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208849
mjacob [Sat, 19 Jun 2010 00:41:29 +0000 (00:41 +0000)]
This is an MFC of 208849

Be more specific about which CDB length we're going to use. Not really a likely
bug but we might as well be clearer.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208809
mjacob [Sat, 19 Jun 2010 00:39:19 +0000 (00:39 +0000)]
This is an MFC of 208809

Make the internal target > SPC2 (so REPORT LUNS can be tested).
Give the NIL inquiry data real values other than just plain 0x7f
in the first byte.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208808
mjacob [Sat, 19 Jun 2010 00:37:14 +0000 (00:37 +0000)]
This is an MFC of 208808

I was getting panics in sleepq_add for the second sleep in isp_kthread.
I don't know why- but it occurred to me in looking at the second sleep
is that all I want is a pause- not an actual sleep. So do that instead.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208761
mjacob [Fri, 18 Jun 2010 21:37:27 +0000 (21:37 +0000)]
This is an MFC of 208761

Various minor and not so minor fixes suggested by Coverity.
In at least one case, it's amazing that target mode worked at all.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of E1000 drivers:
jfv [Fri, 18 Jun 2010 17:22:08 +0000 (17:22 +0000)]
MFC of E1000 drivers:
  Stability fixes from M.Tuexen
  Cool stats changes from gnn
  Changes for POLL friendliness from John Baldwin

  Thanks everyone!

MFC to RELENG8.1 asap

git-svn-id: svn://svn.freebsd.org/base/stable/8@209309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of ixgbe driver version 2.2.1
jfv [Fri, 18 Jun 2010 16:36:57 +0000 (16:36 +0000)]
MFC of ixgbe driver version 2.2.1
  -mostly stability fixes

MFC to RELENG 8.1 asap

git-svn-id: svn://svn.freebsd.org/base/stable/8@209308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r207578:
kan [Fri, 18 Jun 2010 16:14:37 +0000 (16:14 +0000)]
MFC r207578:
Do not encode more than CTF_MAX_VLEN(1023) enum members.

CTF can not represent enums with more than CTF_MAX_VLEN members, but
ctfconvert will happily ignore that limitation and create CTF section no
other tool can interpret.

This change is different from similar change from upstream, which just
returns an error if big enum is encountered.  Doing that means that
every FreeBSD kernel with compiled in hwpmc will have no useable CTF
information due to pmc_event enum having 1236+ members.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209306 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208994:
kan [Fri, 18 Jun 2010 15:25:57 +0000 (15:25 +0000)]
MFC r208994:

Do not require pos parameter to be zero in MAP_ANONYMOUS mmap requests
in Linux emulation layer. Linux seems to only require that pos is
page-aligned, but otherwise ignores it. Default FreeBSD mmap parameter
checking is too strict to allow some Linux binaries to run. tsMuxeR is
one example of such a binary.

Discussed with: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@209304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208763:
kan [Fri, 18 Jun 2010 15:17:38 +0000 (15:17 +0000)]
MFC r208763:
Plug possible memory leak.

Found by:  Coverity Prevent

git-svn-id: svn://svn.freebsd.org/base/stable/8@209303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208773:
kib [Fri, 18 Jun 2010 09:40:01 +0000 (09:40 +0000)]
MFC r208773:
Sometimes vnodes share the lock despite being different vnodes on
different mount points, e.g. the nullfs vnode and the covered vnode
from the lower filesystem. In this case, existing assertion in
vop_rename_pre() may be triggered.

Check for vnode locks equiality instead of the vnodes itself to
not trip over the situation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208604:
kib [Fri, 18 Jun 2010 09:34:31 +0000 (09:34 +0000)]
MFC r208604:
Clarify a potential issue in get_fpcontext() use.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208565:
kib [Fri, 18 Jun 2010 09:29:08 +0000 (09:29 +0000)]
MFC r208565:
Remove a check that should be always true.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208340:
kib [Fri, 18 Jun 2010 09:25:00 +0000 (09:25 +0000)]
MFC r208340:
When waiting for the busy page, do not unlock the object unless unlock
cannot be avoided.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208728 - Fix stuttering sequences and reverse ranges
brian [Fri, 18 Jun 2010 07:19:30 +0000 (07:19 +0000)]
MFC r208728 - Fix stuttering sequences and reverse ranges

PR:             123635
Submitted by:   Ulrich Spörlein, uqs at spoerlein dot net

git-svn-id: svn://svn.freebsd.org/base/stable/8@209284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208770:
pjd [Fri, 18 Jun 2010 06:24:40 +0000 (06:24 +0000)]
MFC r208770:

opensolaris_kmem.c is already part of opensolaris.ko which zfs.ko depends on.

Reported by: avg

git-svn-id: svn://svn.freebsd.org/base/stable/8@209283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 207543
mjacob [Fri, 18 Jun 2010 04:51:17 +0000 (04:51 +0000)]
This is an MFC of 207543

Print IR_RESYNC updates informatively.

Obtained from: pluknet

git-svn-id: svn://svn.freebsd.org/base/stable/8@209282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 207938
mjacob [Fri, 18 Jun 2010 04:45:06 +0000 (04:45 +0000)]
This is an MFC of 207938

Pick up the right change, not it's close cousin. The one
previously submitted was wrong.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 207933
mjacob [Fri, 18 Jun 2010 04:43:22 +0000 (04:43 +0000)]
This is an MFC of 207933

Deal sensibly with more than 26 sg devices. It isn't a complete
solution.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208101
mjacob [Fri, 18 Jun 2010 04:01:59 +0000 (04:01 +0000)]
This is an MFC of 208101

Yet another potential dereference of a dead provider.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209279 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoThis is an MFC of 208082
mjacob [Fri, 18 Jun 2010 03:59:07 +0000 (03:59 +0000)]
This is an MFC of 208082

Make sure to check that the active provider pointer points to something before
dereferencing the pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208553
qingli [Fri, 18 Jun 2010 03:31:33 +0000 (03:31 +0000)]
MFC r208553

This patch fixes the problem where proxy ARP entries cannot be added
over the if_ng interface.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209093-r209101:
mm [Thu, 17 Jun 2010 22:38:23 +0000 (22:38 +0000)]
MFC r209093-r209101:

MFC r209093:
Fix unable to remove a file over NFS after hitting refquota limit
OpenSolaris onnv rev: 8890:8c2bd5f17bf2
OpenSolaris Bug ID: 6798878

MFC r209094:
Fix zfs destroy fails to free object in open context, stops up txg train
OpenSolaris onnv rev: 9409:9dc3f17354ed
OpenSolaris Bug ID: 6809683

MFC r209095:
Fix incomplete resilvering after disk replacement (raidz)
OpenSolaris onnv rev: 9434:3bebded7c76a
OpenSolaris Bug ID: 6794570

MFC r209096:
Fix vdev_probe() starvation brings txg train to a screeching halt
OpenSolaris onnv rev: 9722:e3866bad4e96
OpenSolaris Bug ID: 6844069

MFC r209097:
Fix ZFS panic deadlock: cycle in blocking chain via zfs_zget
OpenSolaris onnv rev: 9774:0bb234ab2287
OpenSolaris Bug ID: 6788152

MFC r209098:
Fix zpool resilver stalls with spa_scrub_thread in a 3 way deadlock
OpenSolaris onnv rev: 9997:174d75a29a1c
OpenSolaris Bug ID: 6843235

MFC r209099:
Fix possible zfs panic on zpool import
OpenSolaris onnv rev: 10040:38b25aeeaf7a
OpenSolaris Bug ID: 6857012

MFC r209100:
Fix panic in zfs_getsecattr
OpenSolaris onnv rev: 10295:f7a18a1e9610
OpenSolaris Bug ID: 6870564

MFC r209101:
Fix arc_read_done may try to byteswap undefined data (sparc related)
OpenSolaris onnv rev: 10839:cf83b553a2ab
OpenSolaris Bug ID: 6836714

Obtained from: OpenSolaris (multiple Bug IDs)
Approved by: pjd, delphij (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209004:
randi [Thu, 17 Jun 2010 21:17:35 +0000 (21:17 +0000)]
MFC r209004:
  Fix uninitialized variables that cause a crash when the network is
  initialized and sysinstall is not running as init.

Submitted by: Nick Mills
Approved by: cperciva (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r209138
marius [Thu, 17 Jun 2010 20:10:39 +0000 (20:10 +0000)]
MFC: r209138

Update a branch missed in r207537 (committed to stable/8 in r207890).

git-svn-id: svn://svn.freebsd.org/base/stable/8@209269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209063:
mlaier [Thu, 17 Jun 2010 19:46:36 +0000 (19:46 +0000)]
MFC r209063:
  Cache the last result from if_indextoname for printing.  This speeds up
  "arp -an" when using a lot of aliases (on a single interface).

  A better fix would include a better interface for if_indextoname than
  getting the whole address list from the kernel just to find the one
  index->name mapping.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209260,r209261:
pjd [Thu, 17 Jun 2010 19:25:05 +0000 (19:25 +0000)]
MFC r209260,r209261:

r209260:

Backout r207970 for now, it can lead to deadlocks.

Reported by: kan

r209261:

Turn off UMA allocations on all archs by default. It isn't stable even on
amd64.

Reported by: many

git-svn-id: svn://svn.freebsd.org/base/stable/8@209265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 209178
tuexen [Thu, 17 Jun 2010 19:17:50 +0000 (19:17 +0000)]
MFC 209178
 * Fix a bug where the length of the ASCONF-ACK was calculated wrong due
   to using an uninitialized variable.
 * Fix a bug where a NULL pointer was dereferenced when interfaces
   come and go at a high rate.
 * Fix a bug where inps where not deregistered from iterators.
 * Fix a race condition in freeing an association.
 * Fix a refcount problem related to the iterator.
 Each of the above bug results in a panic. It shows up when
 interfaces come and go at a high rate.

git-svn-id: svn://svn.freebsd.org/base/stable/8@209264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209175,r209177,r209179,r209180,r209181,r209182,r209183,r209184,r209185:
pjd [Thu, 17 Jun 2010 19:17:31 +0000 (19:17 +0000)]
MFC r209175,r209177,r209179,r209180,r209181,r209182,r209183,r209184,r209185:

r209175:

Eliminate dead code.

Found by: Coverity Prevent
CID: 5158

r209177:

Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by: Coverity Prevent
CID: 5243

r209179:

Plug memory leaks.

Found by: Coverity Prevent
CID: 7052, 7053, 7054, 7055

r209180:

Plug memory leak.

Found by: Coverity Prevent
CID: 7051

r209181:

Plug memory leak.

Found by: Coverity Prevent
CID: 7056

r209182:

Plug memory leak.

Found by: Coverity Prevent
CID: 7057

r209183:

Initialize gctl_seq for synchronization requests.

Reported by: hiroshi@soupacific.com
Analysed by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: hiroshi@soupacific.com, Mikolaj Golub <to.my.trociny@gmail.com>

r209184:

Fix typos.

r209185:

Correct various log messages.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@209263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209186,r209187:
pjd [Thu, 17 Jun 2010 19:06:11 +0000 (19:06 +0000)]
MFC r209186,r209187:

r209186:

BIO_DELETE contains range we want to delete and doesn't provide any useful
data, so there is no need to copy it to userland.

r209187:

'unit' can be negative, so use signed type for it.

Found by: Coverity Prevent
CID: 3731

git-svn-id: svn://svn.freebsd.org/base/stable/8@209262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoAdjust __FreeBSD_version to reflect releng/8.1 has been created.
kensmith [Mon, 14 Jun 2010 02:21:43 +0000 (02:21 +0000)]
Adjust __FreeBSD_version to reflect releng/8.1 has been created.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209146 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208888,208889,209017:
delphij [Sat, 12 Jun 2010 05:22:55 +0000 (05:22 +0000)]
MFC r208888,208889,209017:

 - make sure that initialize isb with fstat() on
   input file before using it. (bin/147275)
 - Fix grammar for st_nlink.
 - Style changes.

PR: bin/147275
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209090 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209078:
delphij [Sat, 12 Jun 2010 05:21:29 +0000 (05:21 +0000)]
MFC r209078:

Detect bit endianness through machine/endian.h.
This fixes xz on big-endian systems.

Tested on: sparc64 (kindly provided by linimon), amd64
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208795; additional date -v detail
brian [Sat, 12 Jun 2010 02:00:15 +0000 (02:00 +0000)]
MFC r208795; additional date -v detail

PR: 147354
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208778
marius [Sat, 12 Jun 2010 00:28:41 +0000 (00:28 +0000)]
MFC: r208778

- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
- Add information regarding VTOC8 bootrstrap code and how it's handled with
  r208777 in place.
- Document the mapping of partition types to VTOC8 tags.
- Add examples for VTOC8 to the respective section.
- Eliminated hard sentence breaks.

Reviewed by: marcel (slightly buggy version)
Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRevert part of r209077 which shouldn't have been MFC'ed, yet.
marius [Fri, 11 Jun 2010 22:59:47 +0000 (22:59 +0000)]
Revert part of r209077 which shouldn't have been MFC'ed, yet.
This is a direct commit to stable/8.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208777
marius [Fri, 11 Jun 2010 22:25:50 +0000 (22:25 +0000)]
MFC: r208777

- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
  file to be of maximum size.
- Add special handling required for SMI/VTOC8 disklabel partcode, i.e. avoid
  overwriting the label when writing the bootstrap code to the partition
  starting at 0 and install it to all partitions when the -i option is omitted
  just like geom_sunlabel(4) and sunlabel(8) do by default.
- Add missing prototypes.
- Add const where applicable.

Reviewed by: marcel
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209077 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208776
marius [Fri, 11 Jun 2010 22:01:58 +0000 (22:01 +0000)]
MFC: r208776

Avoid possible NULL-dereferences.

Found with: Coverity Prevent(tm)
CID: 3428
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208746
marius [Fri, 11 Jun 2010 21:54:04 +0000 (21:54 +0000)]
MFC: r208746

Don't leak memory on destruction.

Reviewed by: marcel
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209073 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 209029
tuexen [Fri, 11 Jun 2010 20:38:20 +0000 (20:38 +0000)]
MFC 209029

 3 Fixes -
 a) There was a case where a ICMP message could cause
    us to return leaving a stuck lock on an stcb.
 b) The iterator needed some tweaks to fix its lock
    ordering.
 c) The ITERATOR_LOCK is no longer needed in the freeing
    of a stcb. Now that the timer based one is gone we don't
    have a multiple resume situation. Add to that that there
    was somewhere a path out of the freeing of an assoc that
    did NOT release the iterator_lock.. it was time to clean
    this old code up and in the process fix the lock bug.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 199549, 199997, 204158, 207673, and 208901.
ken [Fri, 11 Jun 2010 19:17:36 +0000 (19:17 +0000)]
MFC 199549, 199997, 204158, 207673, and 208901.

Bring in a number of netfront changes:

r199549 | jhb

  Remove commented out reference to if_watchdog and an assignment of zero to
  if_timer.

  Reviewed by: scottl

r199997 | gibbs

  Add media ioctl support and link notifications so that devd will attempt
  to run dhclient on a netfront (xn) device that is setup for DHCP in
  /etc/rc.conf.

  PR: kern/136251 (fixed differently than the submitted patch)

r204158 | kmacy

  - make printf conditional
  - fix witness warnings by making configuration lock a mutex

r207673 | joel

  Switch to our preferred 2-clause BSD license.

  Approved by: kmacy

r208901 | ken

  A number of netfront fixes and stability improvements:

   - Re-enable TSO.  This was broken previously due to CSUM_TSO clearing the
     CSUM_TCP flag, so our checksum flags were incorrectly set going to the
     netback driver.  That was fixed in r206844 in tcp_output.c, so we can
     turn TSO back on here.

   - Fix the way transmit slots are calculated, so that we can't overfill
     the ring.

   - Avoid sending packets with more fragments/segments than netback can
     handle.  The Linux netback code can only handle packets of
     MAX_SKB_FRAGS, which turns out to be 18 on machines with 4K pages.  We
     can easily generate packets with 32 or so fragments with TSO turned on.
     Right now the solution is just to drop the packets (since netback
     doesn't seem to handle it gracefully), but we should come up with a way
     to allow a driver to tell the TCP stack the maximum number of fragments
     it can handle in a single packet.

   - Fix the way the consumer is tracked in the receive path.  It could get
     out of sync fairly easily.

   - Use standard Xen ring macros to make it clearer how netfront is using
     the rings.

   - Get rid of Linux-ish negative errno return values.

   - Added more documentation to the driver.

   - Refactored code to make it easier to read.

   - Some other minor fixes.

  Reviewed by: gibbs
  Sponsored by: Spectra Logic

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r205940:
delphij [Fri, 11 Jun 2010 17:38:24 +0000 (17:38 +0000)]
MFC r205940:

Remove unused files.

PR: bin/38256
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209054 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoiMFC r208484: Fix back references in substitute command for pax(1)
uqs [Fri, 11 Jun 2010 15:55:18 +0000 (15:55 +0000)]
iMFC r208484: Fix back references in substitute command for pax(1)

pax(1) was trying to copy the back-referenced data from
the match pattern, not the matched data.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208811:
trasz [Fri, 11 Jun 2010 15:26:15 +0000 (15:26 +0000)]
MFC r208811:

Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).

Found with: Coverity Prevent
CID: 7466, 7467
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoFix usage of uninitialized variable.
trasz [Fri, 11 Jun 2010 15:21:12 +0000 (15:21 +0000)]
Fix usage of uninitialized variable.

Found with: Coverity Prevent
CID: 7517
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209046 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208162, 208836, 208837:
nwhitehorn [Fri, 11 Jun 2010 14:10:20 +0000 (14:10 +0000)]
MFC r208162, 208836, 208837:

Program the K2 SATA controller's interrupt to be level-triggered low, and
respect the edge/level settings in the device tree.

OpenPIC on powerpc sets interrupts to be level high by default. On Apple
interrupt controllers, all level interrupts are low regardless of
programming except interrupt 0, used by K2 SATA on some Apple systems, with
the result that the K2 SATA IRQ is misconfigured. Pending review of changes
to this default, work around this by changing the programming of the K2
SATA interrupt to level low.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208870:
nwhitehorn [Fri, 11 Jun 2010 14:06:35 +0000 (14:06 +0000)]
MFC r208870:
Some revisions of the Serverworks K2 SATA controller have a data
corruption bug where if an ATA command is issued before DMA is started,
data will become available to the controller before it knows what to do
with it. This results in either data corruption or a controller crash.

This patch remedies the problem by adopting the workaround employed
by Linux and Darwin: starting the DMA engine prior to sending the ATA
command.

Reviewed by: mav
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208592: mail(1) misses addresses when replying to all
uqs [Fri, 11 Jun 2010 11:24:23 +0000 (11:24 +0000)]
MFC r208592: mail(1) misses addresses when replying to all

There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook.

PR: bin/131861
Submitted by: Pete French <petefrench at ticketswitch.com>
Tested by: Pete French
Reviewed by: mikeh
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:
rrs [Fri, 11 Jun 2010 03:13:19 +0000 (03:13 +0000)]
MFC:
Fix a number of bugs and race conditions.
r208160: Bring back of the iterator thread. It now properly handles VNETS
         having only one thread. The old timer based code was full of
         LOR's and other issues.

r208852: Cleanup bug. Basically when an un-accepted socket was hanging on a
        closed listener, we would leak the inp never cleaning it up

r208853: Enhance the use under invarients of the audit for locks function
         and fix a bug where a close collision with a cookie being processed
         would cause a crash.

r208854: Use the proper increment macros when working with the
         sent_queue_retran_cnt

r208855: Align comments properly, Fix a bug where we were NOT looking at the
         resend markings for control chunks and also not decrementing the
         retran count which caused extra calls to retransmission. Alos add
         a valid no locks call to the output routine.

r208856: Spacing issues in auth/bsd addr.

r208857: Get rid of a windows ifdef that somehow leaked in

r208863: Missing error leg returns in some failure cases

r208864: LOR fix between the iterator and sctp_inpcb_close

r208874: Don't call the sctp_inpcb_free from abort an association since you
         don't know what locks you hold and a timer will take care of the
         situation when the gone flag is set

r208875: sctp_inpcb_free bug - a socket under the right situation could get
         stuck (from the accept queue) and never start the proper cleanup
         timer)

r208876: Further enhance invariant lock validation, Fix a bug where a closed
         socket and a INIT-ACK could collide and cause a crash

r208878: Clear up another bug in sctp_inpcb_free where we would end up due
         to a race in freeing hit a destroy of a contended lock.

r208879: Optimize the cleanup and make some additional fixes in the sysctl
         code so that it won't reference a GONE INP and crash us

r208883 & r208891: Fix so we don't open a hole between a sock lock and a call
         to socantrcvmore.. we could before hit a race that would kill the
         socket underneath us leading to a crash

r208897: CUM-ACK calculation was messed up. So basically large message got
         broken from the original NR_sack integration.

r208902: Make sure that we don't move a bit to the NR array that is behind
         the cum-ack

r208952: Use both bit maps to calculte the cum-ack.

r208953: Fix bug having to do with freeing an sctp_inpcb_free().
    1) make sure not to remove the flag until you get the lock again.
    2) make sure all log_closing calls hold the lock.
    3) Release all the locks when everthing is done and call callout_drain
       not callout_stop..

r208970: Fix some places on user allocation of a new sctp_inpcb where we run
         out of resource that we make sure to NULL the so_pcb pointer.
Approved by: re - (bz@freebsd.org)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208642:
rpaulo [Thu, 10 Jun 2010 20:54:53 +0000 (20:54 +0000)]
MFC r208642:
 Don't shadow the global variable 'version'.

Submitted by: Arnaud Lacombe <alc@NetBSD.org>
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209015 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r204644:
rpaulo [Thu, 10 Jun 2010 20:51:13 +0000 (20:51 +0000)]
MFC r204644:
  Replace Id keyword with FreeBSD keyword and set the svn props correctly.
  No functional change.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208643:
rpaulo [Thu, 10 Jun 2010 20:36:30 +0000 (20:36 +0000)]
MFC r208643:
 Due to the way HALDEBUG() is defined, we need to add curly brackets
 when using it as a sole if clause instruction.

Submitted by: Arnaud Lacombe <alc@NetBSD.org>
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209012 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208644:
rpaulo [Thu, 10 Jun 2010 20:34:22 +0000 (20:34 +0000)]
MFC r208644:
 Due to the way HALDEBUG() is defined, we need to add curly brackets
 when using it as a sole if clause instruction.
 While there, fix 'const static' typo.

Submitted by: Arnaud Lacombe <alc@FreeBSD.org>
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209011 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208712:
rpaulo [Thu, 10 Jun 2010 20:28:42 +0000 (20:28 +0000)]
MFC r208712:
  Rewrite ar9285SetBoardValues() to match what ath9k does and fix out of
  bounds reads.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209010 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208711:
rpaulo [Thu, 10 Jun 2010 20:26:34 +0000 (20:26 +0000)]
MFC r208711:
  Bring in a couple of fixes from the Linux ath9k related to chip hangs.
  While there, try to make the register write pattern look like what's
  done by ath9k.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209009 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208703:
rpaulo [Thu, 10 Jun 2010 20:23:20 +0000 (20:23 +0000)]
MFC r208703:
  Fix an off by one in ar9285SetPowerCalTable().

Found with: Coverity Prevent(tm)
CID: 3979
Approved by: re (kensmit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209008 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208699:
rpaulo [Thu, 10 Jun 2010 20:20:46 +0000 (20:20 +0000)]
MFC r208699:
 Fix resource leaks in ieee80211_ioctl_setchanlist() in case of error.

Found with: Coverity Prevent(tm)
CID: 4115
Approved by:   re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 208603,208605:
jhb [Thu, 10 Jun 2010 20:13:03 +0000 (20:13 +0000)]
MFC 208603,208605:
More gracefully handle stale file handles and attributes when opening a
file via NFS.  Specifically, to satisfy close-to-open-consistency, the NFS
client always performs at least one RPC on a file during an open(2) to see
if the file has changed.  Normally this RPC is an ACCESS or GETATTR RPC
that is forced by flushing a file's attribute cache during nfs_open() and
then requesting new attributes.  However, if the file is noticed to be
stale during nfs_open(), the only recourse is to fail the open(2) call
with ESTALE.  On the other hand, if the ACCESS or GETATTR RPC is sent
during nfs_lookup(), then the NFS client can fall back to a LOOKUP RPC to
obtain the new file handle in the case that a file has been replaced.

This change causes the NFS client to flush the attribute cache during
nfs_lookup() when validating a name cache hit if the attributes fetched
during nfs_lookup() can be reused in nfs_open().  This allows the client
to open a replaced file via the new file handle the first time that it
notices a replaced file rather than failing with ESTALE in some cases.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 208912:
jhb [Thu, 10 Jun 2010 20:04:44 +0000 (20:04 +0000)]
MFC 208912:
Fix a sign bug that caused adaptive spinning in sx_xlock() to not work
properly.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 208925:
jhb [Thu, 10 Jun 2010 20:01:33 +0000 (20:01 +0000)]
MFC 208925:
The lock associated with the /dev/apm knote is already held, so use
KNOTE_LOCKED() instead of KNOTE_UNLOCKED().

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@209000 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC rev 208622:
marcel [Thu, 10 Jun 2010 19:58:54 +0000 (19:58 +0000)]
MFC rev 208622:
The EFI system partition used to make the CD image bootable is running
out of space. Bump it up...

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208835:
nwhitehorn [Thu, 10 Jun 2010 19:11:00 +0000 (19:11 +0000)]
MFC r208835:
Make sure that interrupt sense settings set after interrupts are enabled
are respected. This fixes loading the Apple onboard audio driver
(snd_ai2s) as a module after boot, which would previously cause a panic.

PR: powerpc/146888
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208862:
yongari [Thu, 10 Jun 2010 17:53:35 +0000 (17:53 +0000)]
MFC r208862:
  Fix a bug introduced in r199011. When bge(4) reuses loaded RX
  buffers it should also reinitialize RX descriptors otherwise some
  stale data could be passed to controller. This could end up with
  mbuf double free or unexpected NULL pointer dereference in upper
  stack. To fix the issue, save loaded buffer's length and
  reinitialize RX descriptors with the saved value whenever bge(4)
  reuses the loaded RX buffers.
  While I'm here, increase the number of RX buffers to 512 from 256.
  This simplifies RX buffer handling as well as giving more RX
  buffers. Controller supports just fixed number of RX buffers
  (i.e. 512) and bge(4) used to rely on hope that our CPU is fast
  enough to keep up with the controller. With this change, bge(4)
  will use 1MB for RX buffers but I don't think it would cause
  problems in these days.

  Reported by: marcel
  Tested by: marcel
  Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208993 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRecord merge for r198262 (done in r208894)
mjacob [Wed, 9 Jun 2010 18:46:28 +0000 (18:46 +0000)]
Record merge for r198262 (done in r208894)

Approved by:    re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208956 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208771:
attilio [Wed, 9 Jun 2010 14:54:05 +0000 (14:54 +0000)]
MFC r208771:
Improve wording and fix style.

Sponsored by: Sandvine Incorporated

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208753:
uqs [Wed, 9 Jun 2010 14:31:11 +0000 (14:31 +0000)]
MFC r208753:

Add required header for isalnum(3) to quench compiler warnings

Forgotten in:   r174678
Submitted by:   Alexander Best alexbestms at wwu.de
Approved by:    das
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208074:
uqs [Wed, 9 Jun 2010 14:30:21 +0000 (14:30 +0000)]
MFC r208074:
fsirand(8): make WARNS=3 clean

- Drop bogus quad_t cast for di_gen, it is a 32bit type
- Print di_gen with leading zeros, to get consistent output

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208671: udf_readlink: fix malloc call with uninitialized size
avg [Wed, 9 Jun 2010 10:13:59 +0000 (10:13 +0000)]
MFC r208671: udf_readlink: fix malloc call with uninitialized size
parameter

Found by: clang static analyzer
Approved by: re(kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208800: scsi_cd: pass correct pointer to free()
avg [Wed, 9 Jun 2010 09:44:05 +0000 (09:44 +0000)]
MFC r208800: scsi_cd: pass correct pointer to free()

Found with: Coverity Prevent(tm)
CID: 2986
Approved by: re(kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@208939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f