Commit Graph

178929 Commits

Author SHA1 Message Date
Monthadar Al Jaberi
ff17492f7c Stop a mesh STA from flooding with peer frames.
This problem happens when using ACL policy to filter mesh STA
but two nodes have different policy. Then one of them will try to
peer all the time. This can also help if for any reason one of the
peering mesh STA have problems sending/receiving peer frames.

* Modified struct ieee80211_node to include two new fields:
    + struct callout ni_mlhtimer /* link mesh backoff timer */
    + uint8_t ni_mlhcnt /* link mesh holding counter */
* Added two new sysctl (check sysctl -d for more info):
    + net.wlan.mesh.backofftimeout=5000
    + net.wlan.mesh.maxholding=2;
* When receiving a beacon and we are in IEEE80211_NODE_MESH_IDLE
  check if ni_mlhcnt >= ieee80211_mesh_maxholding, if so do not do anything;
* In mesh_peer_timeout_cb when transitioning from IEEE80211_NODE_MESH_HOLDING
  to IEEE80211_NODE_MESH_IDLE increment ni_mlhcnt, and eventually start
  ieee80211_mesh_backofftimeout;

Approved by:	adrian (mentor)
2013-02-07 21:12:55 +00:00
Xin LI
5be97e72e6 Catch TRACE parameters up with r238888. This change is only needed when
debugging is enabled.
2013-02-07 19:00:54 +00:00
David Chisnall
cfdf2879c9 Import new libc++ to head. Various small fixes and cleanups.
MFC after:	2 weeks
2013-02-07 15:45:28 +00:00
Konstantin Belousov
45732078c1 Document P_PPTRACE.
MFC after:	2 weeks
2013-02-07 15:37:51 +00:00
Konstantin Belousov
2ee83a16c0 Document the detail of interaction between vfork and PT_TRACEME.
MFC after:	2 weeks
2013-02-07 15:36:24 +00:00
Konstantin Belousov
888d4d4f86 When vforked child is traced, the debugging events are not generated
until child performs exec().  The behaviour is reasonable when a
debugger is the real parent, because the parent is stopped until
exec(), and sending a debugging event to the debugger would deadlock
both parent and child.

On the other hand, when debugger is not the parent of the vforked
child, not sending debugging signals makes it impossible to debug
across vfork.

Fix the issue by declining generating debug signals only when vfork()
was done and child called ptrace(PT_TRACEME).  Set a new process flag
P_PPTRACE from the attach code for PT_TRACEME, if P_PPWAIT flag is
set, which indicates that the process was created with vfork() and
still did not execed. Check P_PPTRACE from issignal(), instead of
refusing the trace outright for the P_PPWAIT case.  The scope of
P_PPTRACE is exactly contained in the scope of P_PPWAIT.

Found and tested by:  zont
Reviewed by:	pluknet
MFC after:	2 weeks
2013-02-07 15:34:22 +00:00
Randall Stewart
ded5ea6a25 This fixes a out-of-order problem with several
of the newer drivers. The basic problem was
that the driver was pulling the mbuf off the
drbr ring and then when sending with xmit(), encounting
a full transmit ring. Thus the lower layer
xmit() function would return an error, and the
drivers would then append the data back on to the ring.
For TCP this is a horrible scenario sure to bring
on a fast-retransmit.

The fix is to use drbr_peek() to pull the data pointer
but not remove it from the ring. If it fails then
we either call the new drbr_putback or drbr_advance
method. Advance moves it forward (we do this sometimes
when the xmit() function frees the mbuf). When
we succeed we always call advance. The
putback will always copy the mbuf back to the top
of the ring. Note that the putback *cannot* be used
with a drbr_dequeue() only with drbr_peek(). We most
of the time, in putback, would not need to copy it
back since most likey the mbuf is still the same, but
sometimes xmit() functions will change the mbuf via
a pullup or other call. So the optimial case for
the single consumer is to always copy it back. If
we ever do a multiple_consumer (for lagg?) we
will  need a test and atomic in the put back possibly
a seperate putback_mc() in the ring buf.

Reviewed by:	jhb@freebsd.org, jlv@freebsd.org
2013-02-07 15:20:54 +00:00
Konstantin Belousov
9be7626dee Document the ERESTART translation to EINTR for devfs nodes.
Based on the submission by:	jilles
MFC after:	2 weeks
2013-02-07 15:11:43 +00:00
Konstantin Belousov
2ca4998342 Stop translating the ERESTART error from the open(2) into EINTR.
Posix requires that open(2) is restartable for SA_RESTART.

For non-posix objects, in particular, devfs nodes, still disable
automatic restart of the opens. The open call to a driver could have
significant side effects for the hardware.

Noted and reviewed by:	jilles
Discussed with:	bde
MFC after:	2 weeks
2013-02-07 14:53:33 +00:00
Achim Leubner
f710aaa725 Add myself as a src committer and my mentor relationship.
Approved by:	emaste (co-mentor)
2013-02-07 14:49:55 +00:00
David Chisnall
c7f918d068 Import new libc++ to vendor branch. 2013-02-07 13:09:19 +00:00
David Chisnall
fe9b3289e6 Fix a copy-and-paste error in libcxxrt. 2013-02-07 11:08:03 +00:00
Hans Petter Selasky
2ba0f36139 Add support for mute buttons on USB audio devices and
use the hwvol interface to adjust the mixer settings.

MFC after:	1 week
2013-02-07 08:20:03 +00:00
Adrian Chadd
1b3502e5a1 Create a new TX lock specifically for queuing frames.
This now separates out the act of queuing frames from the act of running
TX and TX completion.
2013-02-07 07:50:16 +00:00
Neel Natu
dae3dc73f6 If an interrupt event's assign_cpu method fails, then restore the original
cpuset mask for the associated interrupt thread.

The text used above is verbatim from r195249 and the code should now be
in line with the intent of that commit.
2013-02-07 06:48:47 +00:00
Adrian Chadd
21bca442b9 Methodize the process of adding the software TX queue to the taskqueue.
Move it (for now) to the TX taskqueue.
2013-02-07 02:15:25 +00:00
Pawel Jakub Dawidek
fbda3d5dae Audit sockaddr argument for bind(2), connect(2), accept(2), sendto(2) and
recvfrom(2) syscalls.

Sponsored by:	The FreeBSD Foundation
2013-02-07 00:36:00 +00:00
Pawel Jakub Dawidek
82b316b377 Minor style tweaks. 2013-02-07 00:27:11 +00:00
Pawel Jakub Dawidek
222069f454 Add AUDIT_ARG_SOCKADDR() macro so we can start using the audit_arg_sockaddr()
function, which is currently unused.

Sponsored by:	The FreeBSD Foundation
2013-02-07 00:24:23 +00:00
Hans Petter Selasky
76b7121294 Add support for buttons on USB audio devices,
like Volume Up and Volume Down.

Reviewed by:	mav @
MFC after:	1 week
2013-02-06 17:43:05 +00:00
John Baldwin
a120a7a3cd Rework the handling of stop signals in the NFS client. The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary.  However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).

This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly.  Also, instead of setting PBDRY on individual sleeps,
the NFS client now sets the TDF_SBDRY flag around each NFS request and
stop signals are masked for all sleeps during that region (the previous
change missed sleeps in lockmgr locks).  The end result is that stop
signals sent to threads performing an NFS request are completely
ignored until after the NFS request has finished processing and the
thread prepares to return to userland.  This restores the behavior of
stop signals being transparent to userland processes while still
preventing threads from suspending while holding NFS locks.

Reviewed by:	kib
MFC after:	1 month
2013-02-06 17:06:51 +00:00
Sergey Kandaurov
23c053d6a2 Prezero the acl structure which is to be copied to usermode, to avoid
leakage of the previous content of padding and unitialized fields.

Reported by:	Ilia Noskov <noskov@nic.ru>
Reviewed by:	kib
MFC after:	1 week
2013-02-06 15:18:46 +00:00
Hans Petter Selasky
68fdacf7c5 Make sure that all mouse buttons are released when clients
using /dev/consolectl close. This fixes a problem where if
a USB mouse is detached while a button is pressed, that
button is never released.

MFC after:	1 week
2013-02-06 11:16:18 +00:00
Martin Matuska
98d50a301a Update vendor-sys/illumos/dist to illumos-gate version 13945:7a9c1d41dfbe
Illumos ZFS issues:
  3507 Tunable to allow block allocation even on degraded vdevs
2013-02-06 08:29:00 +00:00
Martin Matuska
dbfa74b7cc Update vendor/illumos/dist to illumos-gate version 13944:bbcbb468dc37
Illumos dtrace issues:
  3519 DTrace fails to resolve const types from fbt
  3520 dtrace internal error -- token type 316 is not a valid D compilation token
  3521 clean up dtrace unit tests
2013-02-06 08:26:55 +00:00
Martin Matuska
9a11334771 Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13941:d48547176ab4

Illumos ZFS issues:
  3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt)
2013-02-06 08:21:40 +00:00
Martin Matuska
2bb4512243 Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13939:20e4d8d8da6d

illumos dtrace issues:
  3511 dtrace.c erroneously checks for memory alignment on amd64
2013-02-06 08:17:29 +00:00
Martin Matuska
a277867526 Update vendor-sys/illumos/dist to illumos-gate version 13937:6b4f289e7094
Illumos ZFS issues:
 3468 mdb enhancements for zfs development (not relevant for FreeBSD)
2013-02-06 08:14:58 +00:00
Martin Matuska
35f5e42185 Update vendor/illumos/dist to illumos-gate version 13936:60077db1e2cc
Illumos ZFS issues:
 3380 zfs man page: documentation for zfs allow is confusing
2013-02-06 07:59:14 +00:00
Martin Matuska
f056fd4daf Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13934:9e23a7f7b812

Illumos ZFS issues:
 3422 zpool create/syseventd race yield non-importable pool
 3425 first write to a new zvol can fail with EFBIG
2013-02-06 07:54:46 +00:00
Gleb Smirnoff
5fb0e927a8 Fixes to QUEUE_MACRO_DEBUG support:
- Add const quilifiers to fields that store value of __FILE__.
 - Use long type for fields that store value of __LINE__.
 - Sort and style(9) debugging fields.
 - Add initializer for debugging fields into TAILQ_INITIALIZER macro.

PR:		175759
Submitted by:	Andrey Simonenko <simon comsys.ntu-kpi.kiev.ua>
Reviewed by:	bde
2013-02-06 07:27:25 +00:00
Navdeep Parhar
0d8158d796 Busy-wait when cold.
Reported by:	gnn, jhb
MFC after:	3 days
2013-02-06 06:44:42 +00:00
Neel Natu
6d62a48f47 Compute the number of initial kernel page table pages (NKPT) dynamically.
This eliminates the need to recompile the kernel when the default value
of NKPT is not big enough - for e.g. when loading large kernel modules
or memory disk images from the loader.

If NKPT is defined in the kernel configuration file then it overrides the
dynamic calculation.

Reviewed by:	alc, kib
2013-02-06 04:53:00 +00:00
Ganbold Tsagaankhuu
0a8038e3d7 Use and set gpio pin to high to power up usb.
Approved by: gonzo@
2013-02-06 01:03:13 +00:00
Andrew Turner
d74bcf9d9f Add the __aeabi_mem* functions to compiler-rt as clang uses them. 2013-02-06 00:01:28 +00:00
Jilles Tjoelker
eaf7719957 sh: Do not test for digit_contig in mksyntax.
ISO/IEC 9899:1999 (E) 5.2.1p3 guarantees that the values of the characters
0123456789 are contiguous.

The generated syntax.c and syntax.h remain the same.

Submitted by:	Christoph Mallon
2013-02-05 22:54:09 +00:00
Sergey Kandaurov
51dc4fea4c Remove reference to the rlist code from comments, and fix a typo visible
in the resulted change.

Reviewed by:	kib
MFC after:	1 week
2013-02-05 20:08:33 +00:00
Andrew Turner
f892543501 * Add the integer div & mod functions and ARM EABI support functions to
libstand.
* Stop linking the ARM U-Boot loader against libgcc now libstand has the
  required symbols.
2013-02-05 20:03:58 +00:00
John Baldwin
0895e9c70c Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

MFC after:	2 weeks
2013-02-05 18:55:09 +00:00
Hans Petter Selasky
9b3a48ee6f Add defines to more easily allow a single threaded version of the FreeBSD
USB stack. This is useful for non-kernel purposes, like the loader.
2013-02-05 14:44:25 +00:00
Dag-Erling Smørgrav
9c37bca751 Remove political propaganda 2013-02-05 14:39:37 +00:00
Niclas Zeising
71c2381938 Bump .Dd for the change in r246121.
Approved by:	joel (mentor)
2013-02-05 14:29:37 +00:00
Hans Petter Selasky
ff182db6c8 Fix some nits. 2013-02-05 13:30:07 +00:00
Hans Petter Selasky
4b037d67aa Fix depend target. 2013-02-05 12:37:50 +00:00
Dag-Erling Smørgrav
2a31bde3cd Load the pfsync module if necessary.
Reviewed by:	glebius@
MFC after:	1 week
2013-02-05 12:18:39 +00:00
Andrew Turner
62cd261e07 Build clang for little-endian arm by default. Due to size issues when built
with gcc disable CLANG_FULL for now.
2013-02-05 05:16:02 +00:00
Ganbold Tsagaankhuu
3c9606d74e Remove two dead assignments and
make use of sc more explicit and clear

Submitted by: Christoph Mallon
Approved by: gonzo@
2013-02-05 04:13:34 +00:00
Pedro F. Giffuni
d427334435 ext2fs: move assignment where it is not dead.
Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-05 03:26:34 +00:00
Pedro F. Giffuni
80b6a61199 ext2fs: Remove unused em_e2fsb definition..
Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-05 03:23:56 +00:00
Pedro F. Giffuni
555368dcf1 ext2fs: Remove useless rootino local variable.
Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-05 03:17:41 +00:00