]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFix a bug in the sctp_inpcb_free. Basically if the socket
rrs [Sun, 6 Jun 2010 16:09:12 +0000 (16:09 +0000)]
Fix a bug in the sctp_inpcb_free. Basically if the socket
was setup to do an abortive close an association that was
in the accept_queue could get stuck and never freed. Now
we properly start the kill timer on the socket and turn
off the flag (same thing we do for the graceful close method).
MFC after: 1 week

14 years agoFix a bug in sctp_abort_assoc(). DON'T call the sctp_inpcb_free
rrs [Sun, 6 Jun 2010 16:07:40 +0000 (16:07 +0000)]
Fix a bug in sctp_abort_assoc(). DON'T call the sctp_inpcb_free
when the gone flag is set. You don't know what locks the
caller has set and there is already a kill timer running.

MFC after: 1 week

14 years agoRework tcpp output so that it generates a comma-delimited list of values,
rwatson [Sun, 6 Jun 2010 15:27:08 +0000 (15:27 +0000)]
Rework tcpp output so that it generates a comma-delimited list of values,
optionally with a header if "-h" is passed.  Toast CPU time measurement
in the server for now.  Remove -C and -T, since we now always report
both connections/sec and Gb/sec.

MFC after: 1 week
Sponsored by: Juniper Networks

14 years agoAdd Open Firmware PNP info strings to GPIOs and Uninorth cells.
nwhitehorn [Sun, 6 Jun 2010 14:29:06 +0000 (14:29 +0000)]
Add Open Firmware PNP info strings to GPIOs and Uninorth cells.

Submitted by: Andreas Tobler

14 years agoSome revisions of the Serverworks K2 SATA controller have a data
nwhitehorn [Sun, 6 Jun 2010 14:09:48 +0000 (14:09 +0000)]
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.

Observer on: Xserve G5
Reviewed by: mav
MFC after: 1 week

14 years ago- Fix signal handling in bc/dc. Now Ctrl-C terminates the execution.
gabor [Sun, 6 Jun 2010 11:36:08 +0000 (11:36 +0000)]
- Fix signal handling in bc/dc.  Now Ctrl-C terminates the execution.

Requested by: gk (via private mail)
Approved by: delphij (mentor)

14 years ago- Fig segmentation fault
gabor [Sun, 6 Jun 2010 11:32:38 +0000 (11:32 +0000)]
- Fig segmentation fault

Submitted by: Hizel Ildar <hizel@vyborg.ru> (via current@)

14 years agoDon't set PG_WRITEABLE in init_pte_prot() (and thus pmap_enter()) unless
alc [Sun, 6 Jun 2010 06:07:44 +0000 (06:07 +0000)]
Don't set PG_WRITEABLE in init_pte_prot() (and thus pmap_enter()) unless
the page is managed.

Don't set the machine-independent layer's dirty field for the page being
mapped in init_pte_prot().  (The dirty field is only supposed to set when
a mapping is removed or write-protected and the page was managed and
modified.)

Determine whether or not to perform dirty bit emulation based on whether
or not the page is managed, i.e., pageable, not based on whether the page
is being mapped into the kernel address space.  Nearly all of the kernel
address space consists of unmanaged pages, so this has neglible impact on
the overhead of dirty bit emulation for the kernel address space.  However,
there can also exist unmanaged pages in the user address space.  Previously,
dirty bit emulation was unnecessarily performed on these pages.

Tested by: jchandra@

14 years agoHopefully this fixes a LOR by making
rrs [Sun, 6 Jun 2010 02:33:46 +0000 (02:33 +0000)]
Hopefully this fixes a LOR by making
so we only hold the iterator lock during
updates to the iterators work.

MFC after: 1 week

14 years agoBruce's fix for some return's in
rrs [Sun, 6 Jun 2010 02:32:20 +0000 (02:32 +0000)]
Bruce's fix for some return's in
error legs.

MFC after: 1 week

14 years agoFix a bug introduced in r199011. When bge(4) reuses loaded RX
yongari [Sat, 5 Jun 2010 23:29:24 +0000 (23:29 +0000)]
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

14 years agoConvert pm_runcount to int to correctly check for negative value.
fabient [Sat, 5 Jun 2010 23:05:08 +0000 (23:05 +0000)]
Convert pm_runcount to int to correctly check for negative value.
Remove uncessary check for error.

Found with: Coverity Prevent(tm)
MFC after: 1 month

14 years agoFix memory leak on error.
fabient [Sat, 5 Jun 2010 23:00:02 +0000 (23:00 +0000)]
Fix memory leak on error.

Found with: Coverity Prevent(tm)
MFC after: 1 month

14 years agoAlthough we currently don't compile in CPU-pinning support by default,
rwatson [Sat, 5 Jun 2010 22:59:37 +0000 (22:59 +0000)]
Although we currently don't compile in CPU-pinning support by default,
add a -P to enable it if it were.

MFC after: 1 week
Sponsored by: Juniper Networks

14 years agoFix warnings found by Coverity.
fabient [Sat, 5 Jun 2010 22:57:53 +0000 (22:57 +0000)]
Fix warnings found by Coverity.

Found with:   Coverity Prevent(tm)
MFC after: 1 month

14 years agoPurge out a Windows def that somehow slipped
rrs [Sat, 5 Jun 2010 21:39:52 +0000 (21:39 +0000)]
Purge out a Windows def that somehow slipped
past the scrubber.

MFC after: 1 Week

14 years agoSpacing issues
rrs [Sat, 5 Jun 2010 21:33:16 +0000 (21:33 +0000)]
Spacing issues

MFC after: 1 Week

14 years agoThis change does the following:
rrs [Sat, 5 Jun 2010 21:27:43 +0000 (21:27 +0000)]
This change does the following:
1) Fix the alignment of a comment.
2) Fix a BUG where we were NOT paying attention
   to the RESEND marking on retransmitting control
   chunks.. and worse we were not decrementing the
   retran count that could cause us to loop forever.
3) Add in the valdiate_no_lock function on invariants
   so that we will really check all ways out to be sure
   a lock does not slip out locked.

MFC after: 1 week.

14 years agoUse the proper increment macro when increasing the
rrs [Sat, 5 Jun 2010 21:22:58 +0000 (21:22 +0000)]
Use the proper increment macro when increasing the
number on sent_queue_retran_cnt.

MFC after: 1 week

14 years agoThis does two changes:
rrs [Sat, 5 Jun 2010 21:20:28 +0000 (21:20 +0000)]
This does two changes:
1) Makes it so that the INVARIANT function validate nolocks is
   available anywhere.
2) Fixes a BUG where a close has been done on a collision socket
   and the cookie processing would return leaving a lock held.
MFC after: 1 week

14 years agoThis fixes a bug in the close up of a socket that
rrs [Sat, 5 Jun 2010 21:17:23 +0000 (21:17 +0000)]
This fixes a bug in the close up of a socket that
had un-accepted assoc's. Basically the assoc (and inp)
would get stuck and never get cleaned up.

MFC after: 1 week

14 years agoBe more specific about which CDB length we're going to use. Not really a likely
mjacob [Sat, 5 Jun 2010 20:37:40 +0000 (20:37 +0000)]
Be more specific about which CDB length we're going to use. Not really a likely
bug but we might as well be clearer.

Found with: Coverity Prevent(tm)
CID: 3981

MFC after: 2 weeks

14 years agoCorrect a harmless typo introduced when copying code from mmu_oea64.
nwhitehorn [Sat, 5 Jun 2010 18:24:41 +0000 (18:24 +0000)]
Correct a harmless typo introduced when copying code from mmu_oea64.

Submitted by: alc
MFC after: 8.1-RELEASE

14 years agoDon't set PG_WRITEABLE in pmap_enter() unless the page is managed.
alc [Sat, 5 Jun 2010 18:20:09 +0000 (18:20 +0000)]
Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.

Correct a typo in a nearby comment on sparc64.

14 years agoAdd a driver for the CPU temperature sensors attached over I2C on the
nwhitehorn [Sat, 5 Jun 2010 17:51:37 +0000 (17:51 +0000)]
Add a driver for the CPU temperature sensors attached over I2C on the
PowerMac 11,2.

14 years agoAdd support for the I2C busses hanging off Apple system management chips.
nwhitehorn [Sat, 5 Jun 2010 17:50:20 +0000 (17:50 +0000)]
Add support for the I2C busses hanging off Apple system management chips.

14 years agoUtilize the Keywest I2C combined mode for messages with repeated starts.
nwhitehorn [Sat, 5 Jun 2010 17:49:40 +0000 (17:49 +0000)]
Utilize the Keywest I2C combined mode for messages with repeated starts.

14 years agoAdd two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to
nwhitehorn [Sat, 5 Jun 2010 17:48:26 +0000 (17:48 +0000)]
Add two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to
allow consumers of iicbus_transfer() to send messages with repeated starts.

Reviewed by: imp

14 years agoCorrect the comment. We now use level low instead of edge high for this
nwhitehorn [Sat, 5 Jun 2010 16:27:15 +0000 (16:27 +0000)]
Correct the comment. We now use level low instead of edge high for this
interrupt.

14 years agoPartially revert r208162 while waiting for review on a more comprehensive
nwhitehorn [Sat, 5 Jun 2010 16:25:25 +0000 (16:25 +0000)]
Partially revert r208162 while waiting for review on a more comprehensive
fix. On Apple OpenPICs, the low/high bit of the interrupt sense is only
respected for interrupt 0. We currently erroneously program all OpenPIC
interrupts level high instead of level low by default, which only matters
for some G5 systems where the SATA controllers use IRQ 0.

This change is a quick fix that will be reverted once the effect of
changing the default interrupt sense on embedded systems is known.

MFC after: 3 days

14 years agoMake sure that interrupt sense settings set after interrupts are enabled
nwhitehorn [Sat, 5 Jun 2010 16:21:55 +0000 (16:21 +0000)]
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
MFC after: 5 days

14 years agoUse the fpu_kern_enter() interface to properly separate usermode FPU
kib [Sat, 5 Jun 2010 16:00:53 +0000 (16:00 +0000)]
Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.

Globally mark crypto(9) kthread as using FPU.

Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by:   pho
PR:    amd64/135014
MFC after:    1 month

14 years agoIntroduce the x86 kernel interfaces to allow kernel code to use
kib [Sat, 5 Jun 2010 15:59:59 +0000 (15:59 +0000)]
Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches.  There is also a
facility to allow the kernel thread to use pcb save_area.

Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.

KPI discussed with: fabient
Tested by:    pho, fabient
Hardware provided by: Sentex Communications
MFC after:    1 month

14 years agoAdd comment that this value is unused.
edwin [Sat, 5 Jun 2010 12:53:44 +0000 (12:53 +0000)]
Add comment that this value is unused.
It is obvious that it isn't used, but both clang and Coverity talk about it.

Found with:   Coverity Prevent(tm)
CID:          8066

14 years agoWhen there is a problem with writing, also bail out.
edwin [Sat, 5 Jun 2010 12:49:39 +0000 (12:49 +0000)]
When there is a problem with writing, also bail out.

Found with the clang checker.

14 years agoMake clang happier by removing unused assignments.
edwin [Sat, 5 Jun 2010 12:31:08 +0000 (12:31 +0000)]
Make clang happier by removing unused assignments.

14 years agoFix warnings about uninitialized variables.
edwin [Sat, 5 Jun 2010 11:41:46 +0000 (11:41 +0000)]
Fix warnings about uninitialized variables.
It was mostly harmless since strftime() only used %a and %b anyway.

Found with:   Coverity Prevent(tm)
CID:          7769

14 years agoFix: when unable to parse the sequence string, erase everything.
edwin [Sat, 5 Jun 2010 11:32:31 +0000 (11:32 +0000)]
Fix: when unable to parse the sequence string, erase everything.

Found with:   Coverity Prevent(tm)
CID:          7888

14 years agoFix memory-leak at the processing of multiple calendars.
edwin [Sat, 5 Jun 2010 11:12:35 +0000 (11:12 +0000)]
Fix memory-leak at the processing of multiple calendars.

Found with:   Coverity Prevent(tm)
CID:          7085

14 years agoProperly check the return value of chdir, even if it is a "this
edwin [Sat, 5 Jun 2010 11:06:56 +0000 (11:06 +0000)]
Properly check the return value of chdir, even if it is a "this
should not happen" case.

Found with:   Coverity Prevent(tm)
CID:          4932

14 years agoRemove some dead and incorrect code.
mav [Sat, 5 Jun 2010 10:16:23 +0000 (10:16 +0000)]
Remove some dead and incorrect code.

Found with:   Coverity Prevent(tm)
CID:          4562

14 years agoAdd allocation error hadling.
mav [Sat, 5 Jun 2010 09:31:13 +0000 (09:31 +0000)]
Add allocation error hadling.

Found with:   Coverity Prevent(tm)
CID:          3897

14 years agoFix possible use after free.
mav [Sat, 5 Jun 2010 08:58:03 +0000 (08:58 +0000)]
Fix possible use after free.

Found with:   Coverity Prevent(tm)
CID:          4634

14 years agoDon't try to copy a socket after "xxx is a socket (not copied)." message.
trasz [Sat, 5 Jun 2010 08:50:39 +0000 (08:50 +0000)]
Don't try to copy a socket after "xxx is a socket (not copied)." message.
Previously, it would either try to copy it anyway and fail (without -R),
or create fifo instead of the socket (with -R).

Found with: Coverity Prevent
CID: 5623
MFC after: 2 weeks

14 years agoFix use after free on error.
mav [Sat, 5 Jun 2010 08:44:40 +0000 (08:44 +0000)]
Fix use after free on error.

Found with:   Coverity Prevent(tm)
CID:          4722

14 years agoFix double free on error.
mav [Sat, 5 Jun 2010 08:36:37 +0000 (08:36 +0000)]
Fix double free on error.

Found with:   Coverity Prevent(tm)
CID:          4573

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:21:18 +0000 (08:21 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4137

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:16:21 +0000 (08:16 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4196

14 years agoFix attach errors handling.
mav [Sat, 5 Jun 2010 08:14:19 +0000 (08:14 +0000)]
Fix attach errors handling.

Found with:   Coverity Prevent(tm)
CID:          3477

14 years agoPlug resource leak.
trasz [Sat, 5 Jun 2010 08:11:11 +0000 (08:11 +0000)]
Plug resource leak.

Found with: Coverity Prevent
CID: 7040

14 years agoPlug memory leak to silent Coverity. Error is still not really handled.
mav [Sat, 5 Jun 2010 08:07:54 +0000 (08:07 +0000)]
Plug memory leak to silent Coverity. Error is still not really handled.

Found with:   Coverity Prevent(tm)
CID:          4130

14 years agoFix attach errors handling.
mav [Sat, 5 Jun 2010 08:02:19 +0000 (08:02 +0000)]
Fix attach errors handling.

Found with:   Coverity Prevent(tm)
CID:          3424

14 years agoMake sure not to pass NULL to g_orphan_provider().
trasz [Sat, 5 Jun 2010 08:00:52 +0000 (08:00 +0000)]
Make sure not to pass NULL to g_orphan_provider().

Found with: Coverity Prevent
CID: 3411

14 years agoDon't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).
trasz [Sat, 5 Jun 2010 07:40:32 +0000 (07:40 +0000)]
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
MFC after: 2 weeks

14 years agoDon't set PG_WRITEABLE in pmap_enter() unless the page is managed.
alc [Sat, 5 Jun 2010 06:56:06 +0000 (06:56 +0000)]
Don't set PG_WRITEABLE in pmap_enter() unless the page is managed.

14 years agoMake the internal target > SPC2 (so REPORT LUNS can be tested).
mjacob [Sat, 5 Jun 2010 00:56:15 +0000 (00:56 +0000)]
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.

MFC after: 2 weeks

14 years agoI was getting panics in sleepq_add for the second sleep in isp_kthread.
mjacob [Sat, 5 Jun 2010 00:55:21 +0000 (00:55 +0000)]
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.

MFC after: 2 weeks

14 years ago- Add myself to committers-src.dot
mdf [Fri, 4 Jun 2010 17:54:30 +0000 (17:54 +0000)]
- Add myself to committers-src.dot
- Add myself to calendar.freebsd

Approved by: zml (mentor)

14 years agoDon't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there
yongari [Fri, 4 Jun 2010 17:11:33 +0000 (17:11 +0000)]
Don't blindly set IFF_DRV_OACTIVE when sge_encap() fails. If there
is no queued frame, IFF_DRV_OACTIVE would never be cleared.

Submitted by: Nikolay Denev < ndenev <> gmail at com >
MFC after: 4 days

14 years agoDeclare ip6 as (struct in6_addr *) instead of (struct in_addr *). This is
cperciva [Fri, 4 Jun 2010 14:38:24 +0000 (14:38 +0000)]
Declare ip6 as (struct in6_addr *) instead of (struct in_addr *).  This is
a harmless bug since we never actually use ip6 as anything other than an
opaque pointer.

Found with: Coverty Prevent(tm)
CID: 4319
MFC after: 1 month

14 years agoo The typo was intended as it stated in the comment. Revert last.
maxim [Fri, 4 Jun 2010 14:22:49 +0000 (14:22 +0000)]
o The typo was intended as it stated in the comment.  Revert last.

Spotted by: dfr

14 years agoscsi_cd: pass correct pointer to free()
avg [Fri, 4 Jun 2010 13:55:55 +0000 (13:55 +0000)]
scsi_cd: pass correct pointer to free()

Found with: Coverity Prevent(tm)
CID: 2986
MFC after: 4 days

14 years agoo Makefile BSDfication.
maxim [Fri, 4 Jun 2010 08:19:43 +0000 (08:19 +0000)]
o Makefile BSDfication.

PR: misc/147461 (with my changes)
Submitted by: Erik Cederstrand

14 years agoo Fix typo: .uudef -> .undef.
maxim [Fri, 4 Jun 2010 08:14:30 +0000 (08:14 +0000)]
o Fix typo: .uudef -> .undef.

PR: misc/147462
Submitted by: Erik Cederstrand

14 years agoFix PCH chipset IDs. They are 0x3bxx, not 0x3axx.
mav [Fri, 4 Jun 2010 07:35:59 +0000 (07:35 +0000)]
Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx.

Pointy hat to: me

14 years agoExplain that setting an absolute day value can fail and that the month should
brian [Fri, 4 Jun 2010 06:56:58 +0000 (06:56 +0000)]
Explain that setting an absolute day value can fail and that the month should
usually be set first when using -v.

Adjust an example that sets the day to 30 before setting the month to 3 in
accordance with this approach as the example would always fail in February!

PR: 147354
MFC after: 2 weeks

14 years agoMake vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
jchandra [Fri, 4 Jun 2010 06:35:36 +0000 (06:35 +0000)]
Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
fails to allocate MIPS page table pages.  The current usage of VM_WAIT in
case of vm_phys_alloc_contig() failure is not correct, because:

"There is no guarantee that any of the available free (or cached) pages
after the VM_WAIT will fall within the range of suitable physical
addresses.  Every time this function sleeps and a single page is freed
(or cached) by someone else, this function will be reawakened.  With
a little bad luck, you could spin indefinitely."

We also add low and high parameters to vm_contig_grow_cache() and
vm_contig_launder() so that we restrict vm_contig_launder() to the range
of pages we are interested in.

Reported by: alc

Reviewed by: alc
Approved by: rrs (mentor)

14 years ago- Add myself to committers-src.dot
ae [Thu, 3 Jun 2010 21:12:51 +0000 (21:12 +0000)]
- Add myself to committers-src.dot
- Add myself to calendar.freebsd

Approved by: kib (mentor)

14 years agoMake chown(1) emit more useful error message when user/group name is invalid.
trasz [Thu, 3 Jun 2010 20:46:23 +0000 (20:46 +0000)]
Make chown(1) emit more useful error message when user/group name is invalid.

14 years agoDo not leak vm page lock in vm_contig_launder(), vm_pageout_page_lock()
kib [Thu, 3 Jun 2010 18:34:34 +0000 (18:34 +0000)]
Do not leak vm page lock in vm_contig_launder(), vm_pageout_page_lock()
always returns with the page locked.

Submitted by: alc
Pointy hat to: kib

14 years agoUse -Wl,-N instead of the undocumented -N option for GCC.
ed [Thu, 3 Jun 2010 17:42:32 +0000 (17:42 +0000)]
Use -Wl,-N instead of the undocumented -N option for GCC.

GCC forwards the -N flag directly to ld. This flag is not documented and
not supported by (for example) Clang. Just use -Wl,-N.

Submitted by: Pawel Worach

14 years agoAssert that the thread lock is held in sched_pctcpu() instead of
jhb [Thu, 3 Jun 2010 16:02:11 +0000 (16:02 +0000)]
Assert that the thread lock is held in sched_pctcpu() instead of
recursively acquiring it.  All of the current callers already hold the
lock.

MFC after: 1 month

14 years agoDon't forget to free the string in error case.
trasz [Thu, 3 Jun 2010 14:51:29 +0000 (14:51 +0000)]
Don't forget to free the string in error case.

Found with: Coverity Prevent
CID: 6585

14 years ago_posix1e_acl_sort() never returns anything other than 0; change its
trasz [Thu, 3 Jun 2010 14:29:17 +0000 (14:29 +0000)]
_posix1e_acl_sort() never returns anything other than 0; change its
return type to void and update callers.  This simplifies code and
fixes one place where the returned value was not actually checked.

Found with: Coverity Prevent
CID: 4791

14 years agoFix usage of uninitialized variable.
trasz [Thu, 3 Jun 2010 14:27:18 +0000 (14:27 +0000)]
Fix usage of uninitialized variable.

Found with: Coverity Prevent
CID: 7517
MFC after: 2 weeks

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 14:16:58 +0000 (14:16 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 6192

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 14:15:08 +0000 (14:15 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 6193

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:45:27 +0000 (13:45 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3688

14 years agoThe 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:43:58 +0000 (13:43 +0000)]
The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3684

14 years agoThe acl_cnt field is unsigned; no point in checking if it's >= 0.
trasz [Thu, 3 Jun 2010 13:41:55 +0000 (13:41 +0000)]
The acl_cnt field is unsigned; no point in checking if it's >= 0.

Found with: Coverity Prevent
CID: 3683

14 years ago- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
marius [Thu, 3 Jun 2010 13:04:56 +0000 (13:04 +0000)]
- 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)
MFC after: 3 days

14 years ago- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
marius [Thu, 3 Jun 2010 13:01:55 +0000 (13:01 +0000)]
- 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
MFC after: 3 days

14 years agoAvoid possible NULL-dereferences.
marius [Thu, 3 Jun 2010 12:09:02 +0000 (12:09 +0000)]
Avoid possible NULL-dereferences.

Found with: Coverity Prevent(tm)
CID: 3428
MFC after: 3 days

14 years agoFix freeing space after deleting large files with holes.
mm [Thu, 3 Jun 2010 11:08:46 +0000 (11:08 +0000)]
Fix freeing space after deleting large files with holes.

OpenSolaris onnv revision: 9950:78fc41aa9bc5

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6792701)
MFC after: 3 days

14 years agoExtend the scope of the lock on the quota file vnode in quotaon() to
kib [Thu, 3 Jun 2010 10:24:53 +0000 (10:24 +0000)]
Extend the scope of the lock on the quota file vnode in quotaon() to
cover the initial read by dqopen(). Assert that vnode is locked in
dqopen(). Remove VFS_LOCK_GIANT() from dqopen(), since quotaon() keeps
Giant locked if needed around the call.

14 years agoSometimes vnodes share the lock despite being different vnodes on
kib [Thu, 3 Jun 2010 10:20:08 +0000 (10:20 +0000)]
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.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: pho
MFC after: 2 weeks

14 years agoAdd assertion and comment in vm_page_flag_set() describing the expectations
kib [Thu, 3 Jun 2010 10:11:45 +0000 (10:11 +0000)]
Add assertion and comment in vm_page_flag_set() describing the expectations
when the PG_WRITEABLE flag is set.

Reviewed by: alc

14 years ago[0] Improve wording.
attilio [Thu, 3 Jun 2010 09:54:53 +0000 (09:54 +0000)]
[0] Improve wording.
[1] Following style for manpages, just do carriage return after a
    sentence.

Sponsored by: Sandvine Incorporated
[0] Submitted by: emaste
[1] Submitted by: rwatson

14 years agoopensolaris_kmem.c is already part of opensolaris.ko which zfs.ko depends on.
pjd [Thu, 3 Jun 2010 09:29:54 +0000 (09:29 +0000)]
opensolaris_kmem.c is already part of opensolaris.ko which zfs.ko depends on.

Reported by: avg
MFC after: 3 days

14 years agoIn the unlikely event that pmap_ts_referenced() demoted five superpage
alc [Thu, 3 Jun 2010 03:55:22 +0000 (03:55 +0000)]
In the unlikely event that pmap_ts_referenced() demoted five superpage
mappings to the same underlying physical page, the calling thread would be
left forever pinned to the same processor.

MFC after: 3 days

14 years agoMaintain the pretense that we support 32KB pages for the sake of the ia64
alc [Thu, 3 Jun 2010 02:24:53 +0000 (02:24 +0000)]
Maintain the pretense that we support 32KB pages for the sake of the ia64
LINT build.

14 years agoPlug possible memory leak.
kan [Thu, 3 Jun 2010 00:25:43 +0000 (00:25 +0000)]
Plug possible memory leak.

Found by:  Coverity
MFC after: 2 weeks

14 years agoFixes for panic experienced in test at Intel, when
jfv [Thu, 3 Jun 2010 00:00:45 +0000 (00:00 +0000)]
Fixes for panic experienced in test at Intel, when
doing bidirectional stress traffic on 82598.

Also a couple bug fixes from Michael Tuexen, thank you!!

Add a workaround into the header so that 8 REL can use
the driver (adds local copy of ALTQ fix).

MFC: in a few days

14 years agoVarious minor and not so minor fixes suggested by Coverity.
mjacob [Wed, 2 Jun 2010 23:31:27 +0000 (23:31 +0000)]
Various minor and not so minor fixes suggested by Coverity.
In at least one case, it's amazing that target mode worked at all.

Found by: Coverity.
MFC after: 2 weeks

14 years agoDocument import of xz.
mm [Wed, 2 Jun 2010 21:28:07 +0000 (21:28 +0000)]
Document import of xz.

Approved by: delphij (mentor)

14 years agoFix build for O32 systems without a TARGET_CPUTYPE defined. We must default to
jmallett [Wed, 2 Jun 2010 21:15:00 +0000 (21:15 +0000)]
Fix build for O32 systems without a TARGET_CPUTYPE defined.  We must default to
MIPS-III because FreeBSD relies on a number of MIPS-III features; the ABI
default would be MIPS-I which we don't intend to support.  Our old default
before I switched to using the ABI default was MIPS32.

14 years agosh: Pass TERM changes to libedit.
jilles [Wed, 2 Jun 2010 19:16:58 +0000 (19:16 +0000)]
sh: Pass TERM changes to libedit.

I have changed the patch slightly to ignore TERM changes in subshells.

PR: bin/146916
Submitted by: Guy Yur
Obtained from: NetBSD

14 years agoAdd required header for isalnum(3) to quench compiler warnings
uqs [Wed, 2 Jun 2010 18:31:04 +0000 (18:31 +0000)]
Add required header for isalnum(3) to quench compiler warnings

Forgotten in: r174678
Submitted by: Alexander Best alexbestms at wwu.de
Approved by: das

14 years agoProtect periph drivers list and rearrange things to minimize the chance of
mjacob [Wed, 2 Jun 2010 18:06:32 +0000 (18:06 +0000)]
Protect periph drivers list and rearrange things to minimize the chance of
stepping oneself during probing.

Don't blindly decrement a periph probe count.

Reviewed by: scsi@
Obtained from: Alexander Motin, Atillio Rao, Others
MFC after: 1 month

14 years agoProvide memchr() in the libkern.
raj [Wed, 2 Jun 2010 17:27:23 +0000 (17:27 +0000)]
Provide memchr() in the libkern.

This is required by libfdt and will be compiled in conditionally only for
FDT-enabled platforms.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation