Commit Graph

245875 Commits

Author SHA1 Message Date
skrll
1a24f78652 sort (sort of) 2016-10-31 20:14:08 +00:00
kamil
3b2abf0b2a Add CHECK_NOT_THREADED() in __libc_mutexattr_settype_stub()
This makes this function consistent with __libc_mutex_catchall_stub()
and others in the same group.

Approved by <christos>.
2016-10-31 18:10:11 +00:00
abhinav
0551ffcf66 Fix file name auto completion in one specific case.
For example if you do
$mkdir -p /tmp/dir1/dir2

Then:
$ls /tmp/di <TAB> auto completes to
$ls /tmp/dir1/

Hitting <TAB> again auto completes to
$ls /tmp/dir1/dir2

Whereas it should auto complete to
$ls /tmp/dir1/dir2/


Essentially, in cases like above where you have to hit <TAB> twice to get
to the match and there is only one match (because only one file/sub-directory) then
auto complete doesn't work correctly. It doesn't append a trailing slash (in case
of directory) or a space (in case of a file) to the match name.

I have tested file name completion in sh(1) and symbol completion in gdb after
this change.
2016-10-31 17:46:32 +00:00
christos
73f2b871c9 fix typos 2016-10-31 16:23:03 +00:00
christos
179c7d3b31 Merge and fix the timed mutex tests to use absolute time.
NB: the new tests are broken?
2016-10-31 16:21:23 +00:00
maxv
e18421c86e The mbuf is freed by the protocol even on error, so always NULL the pointer
instead of double-freeing it. Indirectly pointed out by Mootja.
2016-10-31 15:27:24 +00:00
maxv
a8d918182b Memory leak, found by Mootja. By the way, we probably shouldn't be
returning -1 here.
2016-10-31 15:08:45 +00:00
maxv
bee122aa97 Memory leak, found by Mootja. It is easily triggerable from userland. 2016-10-31 15:05:05 +00:00
christos
e3992d8536 restore previous logic. 2016-10-31 14:34:32 +00:00
skrll
94b84ddb19 Pre-allocate some kcpuset_ts so that we don't try and allocate in the
wrong context.
2016-10-31 12:49:04 +00:00
skrll
7a18db2183 Fixup IPI interrupt delivery and splsched mask so that
sys/uvm/pmap/pmap_tlb.c

    541 	KASSERTMSG(ci->ci_cpl >= IPL_SCHED,
    542 	    "%s: cpl (%d) < IPL_SCHED (%d)",
    543 	    __func__, ci->ci_cpl, IPL_SCHED);

doesn't fire.
2016-10-31 12:27:22 +00:00
christos
683d8d5aa6 PR/51574: You can't always get what you want, but if you try sometime..
Remove unreachable code.
2016-10-31 12:18:10 +00:00
ozaki-r
cd4a5f447b Add tests for ping6 options
- -S <sourceaddr>
- -I <interface>
- -g <gateway>
2016-10-31 10:38:25 +00:00
martin
4b719b6d22 Stopgap fix for in-kernel compilation (differences between humanize_number(3)
and humanize_number(9)), ok: msaitoh
2016-10-31 09:13:20 +00:00
pgoyette
c16bd04c08 Fix markup .Dv --> .Dq
(Thanks, wiz!)
2016-10-31 07:37:10 +00:00
msaitoh
457bdd14ee Decode Resizable BAR. 2016-10-31 05:10:45 +00:00
dholland
5358d0befc Add another case related to the ones from PR 49278: [A-\\]. 2016-10-31 05:08:53 +00:00
ozaki-r
c5224ffd07 Pull best address selection code out of in6_selectsrc
No functional change.
2016-10-31 04:57:10 +00:00
nonaka
ba5614b57d regen 2016-10-31 04:16:29 +00:00
ozaki-r
0f3a44863e Fix race condition of in6_selectsrc
in6_selectsrc returned a pointer to in6_addr that wan't guaranteed to be
safe by pserialize (or psref), which was racy. Let callers pass a pointer
to in6_addr and in6_selectsrc copy a result to it inside pserialize
critical sections.
2016-10-31 04:16:25 +00:00
nonaka
e40484001a Remove duplicated HUAWEI E353 entry. 2016-10-31 04:15:22 +00:00
dholland
9a414660b9 Regen. 2016-10-31 03:19:23 +00:00
dholland
11840f5367 Add extra ucom/u3g id for Huawei E353; from Ben Gergely in PR 49302. 2016-10-31 03:18:41 +00:00
ozaki-r
6e6136eaff Remove unnecessary NULL checks 2016-10-31 02:50:31 +00:00
knakahara
973dac0e9f Fix locking against myself at wm_turn{on,off} when NET_MPSAFE is defined.
Pointed out by ozaki-r@n.o, thanks.
2016-10-31 02:44:54 +00:00
pgoyette
34a71bb24b Typo 2016-10-31 01:31:25 +00:00
mlelstv
797eebd407 Error recovery stops normal queue processing but didn't resume it
when the recovery succeeded. Add the missing calls to scsipi_channel_thaw
similar to kern/41867.
2016-10-30 23:56:05 +00:00
mlelstv
fc6e0636cf CAM status values are used as xs_status and must be mapped to XS values.
Add the missing mapping for CAM_CMD_TIMEOUT.
2016-10-30 23:35:10 +00:00
kamil
06b9d77598 POSIX harder the pthread_mutex_timedlock(3) prototype
Add missing __restrict keyword to the first pointer parameter.

It was already used for the second argument, should not be a functional
change and generated code should be the same.

This new form is now aligned with POSIX.
2016-10-30 23:26:33 +00:00
christos
7aaeae4638 fix usage (thanks wiz) 2016-10-30 19:33:49 +00:00
christos
1a5428f3fb add a flag to avoid mmap... 2016-10-30 19:13:36 +00:00
kamil
53e134ea9e Add new test t_timedmutex
This test is a clone on t_mutex with additional two tests for timed-mutex
specific block.

All simple-mutex (not with the timed property according to the C11 wording)
specific tests are covered by pthread_mutex_timedlock(3) with parameter
ts_lengthy of sufficiently large tv_sec value (right now UINT16_MAX). If,
a test will hang, it won't wait UINT16_MAX seconds, but will be terminated
within the default timeout for ATF tests (right now 300 [sec] in my
NetBSD/amd64 setup).

This test was inspired by a classic selflock test failure of
pthread_mutex_timedlock(3) of the following form:

#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char **argv)
{
	pthread_mutex_t mtx;
        struct timespec ts;

        ts.tv_sec = 0;
        ts.tv_nsec = 1000;
        printf("ts{.tv_sec = %d, .tv_nsec=%ld}\n", ts.tv_sec, ts.tv_nsec);
        fflush(stdout);

        printf("mtx_init\n");
	assert(pthread_mutex_init(&mtx, NULL) == 0);

        printf("mtx_lock\n");
	assert(pthread_mutex_lock(&mtx) == 0);

        printf("mtx_timedlock\n");
	assert(pthread_mutex_timedlock(&mtx, &ts) == ETIMEDOUT);

        printf("mtx_unlock\n");
	assert(pthread_mutex_unlock(&mtx) == 0);

	printf("mtx_destroy\n");
        assert(pthread_mutex_destroy(&mtx) == 0);

	return 0;
}

Current NetBSD implementation wrongly hangs on this test.

The issue was detected during development of the C11 portable threads.

My local tests in chroot presents that the are further issues:

t_timedmutex (21/25): 10 test cases
    mutex1: [0.001142s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:75: *param != 20
    mutex2: [0.261499s] Passed.
    mutex3: [0.261496s] Passed.
    mutex4: [0.001204s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:265: pthread_mutex_timedlock(&mutex, &ts_lengthy): Connection timed out
    mutex5: [0.001235s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:337: pthread_mutex_timedlock(&mutex5, &ts_lengthy): Connection timed out
    mutex6: [21.218497s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:512: start != 1
    mutexattr1: [0.001328s] Passed.
    mutexattr2: [0.001175s] Passed.
    timedmutex1: [301.119397s] Failed: Test case timed out after 300 seconds
    timedmutex2: [301.123081s] Failed: Test case timed out after 300 seconds
[623.990659s]

I'm also receiveing the same failure in the mutex6 test in t_mutex, so
there might be a false positives due to local chroot(8) issues.

Commit approved by <christos>.
2016-10-30 16:17:16 +00:00
riastradh
6b3de624e6 Handle variable expansion and comma/space separators in postconf.
From Timo Buhrmester:
https://mail-index.netbsd.org/tech-userlevel/2016/08/20/msg010301.html
2016-10-30 15:47:06 +00:00
christos
805187f5b9 Tidy up panic messages, no functional change. 2016-10-30 15:01:46 +00:00
kamil
9a33a81286 Fix generation of distribution with MKCATPAGES=yes
There are 50+ files from recent OpenSSL that are missing in the .cat set.

Add missing entries to appropriate lists.
2016-10-29 17:12:20 +00:00
martin
226fa8b9ee Add a skip_solib_resolver, from Rin Okuyama, fixes single stepping for
shared binaries.
2016-10-29 17:02:06 +00:00
mlelstv
867d0d62f8 tag debug libraries with 'debuglib' instead of 'debug'. Fixes mips builds. 2016-10-29 10:56:57 +00:00
christos
59fd163dda regen 2016-10-28 23:44:54 +00:00
christos
6f53bbe9e7 Fix arg64 computation for compat_netbsd32 2016-10-28 23:44:32 +00:00
jdolecek
b695bc874e reorganize ffs_truncate()/ffs_indirtrunc() to be able to partially
succeed; change wapbl_register_deallocation() to return EAGAIN
rather than panic when code hits the limit

callers changed to either loop calling ffs_truncate() using new
utility ufs_truncate_retry() if their semantics requires it, or
just ignore the failure; remove ufs_wapbl_truncate()

this fixes possible user-triggerable panic during truncate, and
resolves WAPBL performance issue with truncates of large files

PR kern/47146 and kern/49175
2016-10-28 20:38:12 +00:00
jdolecek
2bdebe34e2 adjust the nvme entry; the flush cache is now asynchronous, and be more
specific for the get/set cache entry too
2016-10-28 20:30:37 +00:00
jdolecek
71a8e131fb fixup comment 2016-10-28 20:17:27 +00:00
christos
d7098f16af sprinkle ifdef spices. 2016-10-28 19:00:48 +00:00
christos
931e76f255 export rl_done 2016-10-28 18:32:35 +00:00
christos
1a4590725b pass the stream to the getc function 2016-10-28 18:32:26 +00:00
msaitoh
4ea63ab43a Fix PHY access on 82567(ICH8 or ICH10), 82574 and 82583:
- Use wm_gmii_bm_{read,write}reg() on 82574 and 82573.
- Issue page select correctly on BM PHYs.
2016-10-28 09:16:02 +00:00
ozaki-r
8941dc1184 Fix an assertion in _psref_held
The assertion, psref->psref_lwp == curlwp, is valid only if the target
is held by the caller.

Reviewed by riastradh@
2016-10-28 07:27:52 +00:00
msaitoh
e7ac631384 regen. 2016-10-28 07:26:41 +00:00
msaitoh
65b5af548f - Add some Core i7-800 and i5-700 devices from "Intel Core i7-800 and i5-700
Desktop Processor Series Datasheet - Volume 2" (Document Number 322910-003).
- Change some descriptions of Core i5-600 and i3-500 devices.
2016-10-28 07:25:25 +00:00
msaitoh
dd9c0d71d4 Change debug flags to be better than before. 2016-10-28 06:59:08 +00:00