Commit Graph

174829 Commits

Author SHA1 Message Date
Jim Harris
dfbc6dc2fa Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).

MFC after:	3 days
2012-12-05 20:21:33 +00:00
Hiroki Sato
0bebb5448b - Move definition of V_deembed_scopeid to scope6_var.h.
- Deembed scope id in L3 address in in6_lltable_dump().
- Simplify scope id recovery in rtsock routines.
- Remove embedded scope id handling in ndp(8) and route(8) completely.
2012-12-05 19:45:24 +00:00
Konstantin Belousov
eb8a718686 The softclock_call_cc() is executing with the callout already removed
from the callwheel. Calculate the cc->cc_next before removing the
callout, otherwise the code followed the invalid tailq links.  After
this, make softclock_call_cc() return void, since it always return
cc->cc_next, which is immediately available to the softclock()
anyway. This also allows to eliminate a label under #ifdef SMP.

Remove the assignment of cc->cc_next from callout_cc_del(), since the
function is called with the callout already removed from callwheel.

If cancelling the migration, also clear the CALLOUT_DFRMIGRATION flag.

Postpone the free of the timeout(9) allocated callouts after the
migration checks are done.

Add some more strict asserts about the state of the callout in
callout_call_cc().

Reviewed by:	attilio
Reported and tested by:	pho (previous version)
MFC after:	2 weeks
2012-12-05 19:02:22 +00:00
Attilio Rao
1c7d98d0df Check for lockmgr recursion in case of disown and downgrade and panic
also in !debugging kernel rather than having "undefined" behaviour.

Tested by:	avg
MFC after:	1 week
2012-12-05 15:11:01 +00:00
Eitan Adler
8d36e2f17b Use Bernard Baruch's full name.
The words "old than" seem to be quoted as "older than" by some sources,
so use the more likely and grammatically correct text.

PR:		docs/173868
Submitted by:	Chris Petrik <c.petrik.sosa@gmail.com>
Approved by:	cperciva
MFC after:	1 week
2012-12-05 13:57:00 +00:00
Eitan Adler
fa65b91ab3 Simplify string duplication: use strdup instead of malloc + strcpy
Submitted by:	db
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:56 +00:00
Eitan Adler
dae7204032 Avoid overflowing the file buffer
Submitted by:	db
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:52 +00:00
Eitan Adler
91d073903e Use strdup instead of malloc + strcpy
Submitted by:	db
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:49 +00:00
Eitan Adler
6c3c59886c Avoid overflow of file buffer
Submitted by:	db
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:46 +00:00
Eitan Adler
61fd27bb3b Remove useless check for NULL prior to free.
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:43 +00:00
Eitan Adler
01d9852a4d Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Submitted by:	gcooper
Approved by:	cperciva
MFC after:	3 days
2012-12-05 13:56:39 +00:00
Eitan Adler
a927ac5de0 Remove pointless check for the existence of /usr/bin/less which exists
in all configurations.

Reviewed by:	mjg
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:36 +00:00
Eitan Adler
c7b686bbb7 Add ability to mergemaster to permit the user to type
the absolute path to PAGER if mergemaster can not find
the one already set.

Reviewed by:	mjg
Approved by:	cperciva
MFC after:	2 weeks
2012-12-05 13:56:32 +00:00
Eitan Adler
dc5e7eb62e Connect organization.dot to the build
Approved by:	cperciva
MFC after:	3 days
2012-12-05 13:05:24 +00:00
Baptiste Daroussin
29aaa96159 if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org

MFC after:	1 month
2012-12-05 11:35:50 +00:00
Gleb Smirnoff
eb1b1807af Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags within sys.

Exceptions:

- sys/contrib not touched
- sys/mbuf.h edited manually
2012-12-05 08:04:20 +00:00
Rui Paulo
6dbda21756 Remove dead code that clang refuses to compile. 2012-12-05 04:22:53 +00:00
Konstantin Belousov
f7e50ea722 Fix a race between kern_setitimer() and realitexpire(), where the
callout is started before kern_setitimer() acquires process mutex, but
looses a race and kern_setitimer() gets the process mutex before the
callout.  Then, assuming that new specified struct itimerval has
it_interval zero, but it_value non-zero, the callout, after it starts
executing again, clears p->p_realtimer.it_value, but kern_setitimer()
already rescheduled the callout.

As the result of the race, both p_realtimer is zero, and the callout
is rescheduled. Then, in the exit1(), the exit code sees that it_value
is zero and does not even try to stop the callout. This allows the
struct proc to be reused and eventually the armed callout is
re-initialized.  The consequence is the corrupted callwheel tailq.

Use process mutex to interlock the callout start, which fixes the race.

Reported and tested by:	pho
Reviewed by:	jhb
MFC after:	2 weeks
2012-12-04 20:49:39 +00:00
Konstantin Belousov
9bdf6ccab3 Do not allocate buffer of the 255 bytes length on the stack.
Reported and tested by:	sig6247@gmail.com
MFC after:	1 week
2012-12-04 20:49:04 +00:00
Gleb Smirnoff
7c283ae860 Fix fallout from r243019, which broke parsing of shortened network
prefixes.

Reported and tested by:	delphij
2012-12-04 20:05:01 +00:00
Hiroki Sato
5c9fa630f6 - Fix LOR in sa6_recoverscope() in rt_msg2()[1].
- Check V_deembed_scopeid before checking if sa_family == AF_INET6.
- Fix scope id handing in route(8)[2] and ifconfig(8).

Reported by:	rpaulo[1], Mateusz Guzik[1], peter[2]
2012-12-04 17:12:23 +00:00
Jilles Tjoelker
273e3bbfe6 libc: Use the new 'e' fopen() mode option to simplify fstab.c.
No functional change is intended.
2012-12-04 16:54:43 +00:00
Pawel Jakub Dawidek
456b64c443 Use absolute path for /usr/libexec/ld-elf.so.1 symlink.
Requested by:	kan, kib

Use -h flags for chflags, so we won't remove 'schg' flag from system's
/libexec/ld-elf.so.1.

MFC after:	2 weeks
2012-12-04 14:36:01 +00:00
Konstantin Belousov
c1e231bcbb Fix typo.
Submitted by:	bjk
MFC after:	3 days
2012-12-04 14:07:17 +00:00
Pawel Jakub Dawidek
f31c1e3fd3 Do not change entire BINDIR, it might be needed later, just change
symlink target.

MFC after:	2 weeks
2012-12-04 12:51:33 +00:00
Pawel Jakub Dawidek
dee6306480 Change /usr/libexec/ld-elf.so.1 to point at ../../libexec/ld-elf.so.1
instead of /libexec/ld-elf.so.1. Below in the Makefile we execute
'chflags noschg ${DESTDIR}/usr/libexec/ld-elf.so.1', which follows
symlink and removes 'schg' flag from system's /libexec/ld-elf.so.1
instead of the one in DESTDIR. It is also more friendly to use
replative paths in symlink in case of jail/chroot environments.

Obtained from:	WHEEL Systems
MFC after:	2 weeks
2012-12-04 12:39:26 +00:00
Gleb Smirnoff
f1e17e139d Flush stdout after RTM_IFANNOUNCE message.
PR:		bin/151600
Submitted by:	Eric van Gyzen <eric vangyzen.net>
2012-12-04 11:10:01 +00:00
Gleb Smirnoff
3fa6535388 No need to be root when running with -t or -d. 2012-12-04 10:24:50 +00:00
Kevin Lo
5e48557ef0 Document that bind(2) can fail with EAFNOSUPPORT.
Reviewed by:	glebius
2012-12-04 09:53:09 +00:00
Gleb Smirnoff
c6499eccad Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.
2012-12-04 09:32:43 +00:00
Joel Dahl
8ca5c3fae7 Remove superfluous paragraph macro. 2012-12-04 09:02:49 +00:00
Joel Dahl
43b54fd4fb Remove snapshots.jp.freebsd.org. It stopped working years ago.
Discussed with:	hrs
2012-12-04 07:22:15 +00:00
Alfred Perlstein
922314f018 replace bit shifting loop with 1<<fls(n), improve comments.
Reviewed by: davide
2012-12-04 05:28:20 +00:00
Bryan Drewery
0a44395e2d - Move EXAMPLES descriptions to before the actual command
- Add mdoc macros for EXAMPLES

Reviewed by:	eadler
Approved by:	gjb
MFC after:	3 days
2012-12-04 00:53:20 +00:00
Jung-uk Kim
cea10e1d3b Fix typos in the previous commit. 2012-12-04 00:44:31 +00:00
Jung-uk Kim
08e90c1491 Tidy up bsd.cpu.mk for X86 CPUs:
- Do not limit recent processors to "prescott" class for i386 target.  There
is no reason for this hack because clang is default now.  On top of that, it
will only grow indefinitely over time.
- Add more CPUTYPEs, i.e., "athlon-fx", "core-avx2", "atom", "penryn", and
"yonah".  Note "penryn" and "yonah" are intentionally undocumented because
they are not supported by gcc and marked deprecated by clang.
- Add more CPUTYPE aliases, i.e., "barcelona" (-> amdfam10), "westmere" and
"nehalem" (-> corei7).  Note these are intentionally undocumented because
they are not supported by (base) gcc and/or clang.  However, LLVM (backend)
seems to "know" the differences.  Most likely, they were deprecated with
other vendor code names and clang did not bother implementing them at all.
- Add i686 to MACHINE_CPU for "c3-2" (VIA Nehemiah).  Both gcc & clang treat
it like an i686-class processor.
- Add IDT "winchip2" and "winchip-c6" for completeness (undocumented).
- Order processors per make.conf example, i.e., CPU vendors and models.
- Tidy up make.conf example, i.e., remove "by gcc" (because we have aliases)
and remove "prescott" from AMD64 architecture (because it is not correct).
2012-12-04 00:37:17 +00:00
Konstantin Belousov
471af3a8df Document the interpretation of the negative value of ticks for
taskqueue_enqueue_timeout(9).

MFC after:	3 days
2012-12-04 00:32:12 +00:00
Adrian Chadd
e89812c379 Methodise the BT diversity configuration function; so the AR9285
can correctly override it.

This was missed in the previous commit.
2012-12-04 00:02:46 +00:00
Adrian Chadd
96b59d60c8 Override the BT coex parameter function for the AR9285. 2012-12-04 00:01:42 +00:00
Adrian Chadd
87a85d8a49 Reformat/reindent. 2012-12-04 00:01:24 +00:00
Adrian Chadd
24a8406b99 Add and tie in the AR5416 bluetooth coexistence methods into the HAL. 2012-12-03 23:45:06 +00:00
Adrian Chadd
4516888b72 Add the AR5416/AR9285 bluetooth coexistence code into the main kernel
build.
2012-12-03 23:43:23 +00:00
Adrian Chadd
8db3411759 Add the btcoex code into the module compilation. 2012-12-03 23:38:08 +00:00
Adrian Chadd
f506aeda9b Include if_ath_alq.c, which only gets actually compiled if ATH_DEBUG_ALQ
is enabled.
2012-12-03 23:36:03 +00:00
Konstantin Belousov
349438a243 Print the frame addresses for the backtraces on i386 and amd64. It
allows both to inspect the frame sizes and to manually peek into the
frames from ddb, if needed.

Reviewed by:	dim
MFC after:	2 weeks
2012-12-03 22:16:51 +00:00
Konstantin Belousov
07840861b1 The vnode_free_list_mtx is required unconditionally when iterating
over the active list. The mount interlock is not enough to guarantee
the validity of the tailq link pointers. The __mnt_vnode_next_active()
and __mnt_vnode_first_active() active lists iterators helper functions
did not provided the neccessary stability for the list, allowing the
iterators to pick garbage.

This was uncovered after the r243599 made the active list iterators
non-nop.

Since a vnode interlock is before the vnode_free_list_mtx, obtain the
vnode ilock in the non-blocking manner when under vnode_free_list_mtx,
and restart iteration after the yield if the lock attempt failed.

Assert that a vnode found on the list is active, and assert that the
helpers return the vnode with interlock owned.

Reported and tested by:	pho
MFC after:	1 week
2012-12-03 22:15:16 +00:00
Xin LI
266ab5afbc Note that the manual page of less(1) says:
Note  that  a preprocessor cannot output an empty file, since that
  is interpreted as meaning there is no replacement, and the  origi-
  nal file is used.  To avoid this, if LESSOPEN starts with two ver-
  tical bars, the exit status of the script becomes meaningful.   If
  the  exit  status is zero, the output is considered to be replace-
  ment text, even if it empty.  If the exit status is  nonzero,  any
  output  is ignored and the original file is used.  For compatibil-
  ity with previous versions of less, if LESSOPEN starts  with  only
  one vertical bar, the exit status of the preprocessor is ignored.

Use two pipe symbols for zless, so that zless'ing a compressed empty
file will give output rather than being interpreted as its compressed
form, which is typically a binary.

Thanks Mark Nudelman for pointing out this difference and the
suggested solution.

Reported by:	Matthias Meyser <meyser xenet.de>
PR:		bin/168839
MFC after:	2 weeks
2012-12-03 21:49:37 +00:00
Jack F Vogel
4153fe7216 Remove the sysctl process_limit interface, after some
thought I've decided its overkill,a simple tuneable for
each RX and TX limit, and then init sets the ring values
based on that, should be sufficient.

More importantly, fix a bug causing a panic, when changing
the define style to IXGBE_LEGACY_TX a taskqueue init was
inadvertently set #ifdef when it should be #ifndef.
2012-12-03 21:38:02 +00:00
Joel Dahl
b8c337a319 - Remove snapshots.se.freebsd.org [1]
- Add ftp6.se.freebsd.org

Discussed with:	brd [1]
2012-12-03 19:55:00 +00:00
Jung-uk Kim
04704c638e Remove fictitious support for 80386-class CPUs from bsd.cpu.mk and make(1).
It was removed from head more than 8 years ago (see r137784 and r137785).

Reviewed by:	imp, delphij, dim
2012-12-03 19:27:31 +00:00