Commit Graph

243291 Commits

Author SHA1 Message Date
ozaki-r
4badfc204a Make sure returning ifp from in6_select* functions psref-ed
To this end, callers need to pass struct psref to the functions
and the fuctions acquire a reference of ifp with it. In some cases,
we can simply use if_get_byindex, however, in other cases
(say rt->rt_ifp and ia->ifa_ifp), we have no MP-safe way for now.
In order to take a reference anyway we use non MP-safe function
if_acquire_NOMPSAFE for the latter cases. They should be fixed in
the future somehow.
2016-06-21 10:25:27 +00:00
ozaki-r
f7107c248e Protect if_byindex with pserialize 2016-06-21 10:21:04 +00:00
ozaki-r
e8cb777b69 Tweak route get outputs to make tests work
"expire" value of route get output is unexpectedly a negative value
on rump kernel for some reasons and the tests almost always fail
on babylon5. So just ignore it to make tests work for now. Should
fix it in the future.
2016-06-21 10:18:27 +00:00
dholland
350ce5f0f9 Revert version 1.19 (make ufid_ino in struct ulfs_ufid 64-bit) -- via
a twisty maze of marginal if not illegal type punning it breaks the
cleaner.

This will need to be done over, but it requires substantially more
mechanism and compat ioctls. Booo.
2016-06-21 06:14:40 +00:00
ozaki-r
f91dfc925e Make a bunch of test names self-descriptive 2016-06-21 05:04:16 +00:00
knakahara
36a04107c0 fix ATF net/carp failure 2016-06-21 03:54:04 +00:00
ozaki-r
57a1dc91ad Bump kernel version for ip_moptions and ip6_moptions changes
And maybe if_output_lock changes also needed a bump?
2016-06-21 03:34:22 +00:00
ozaki-r
43c5ab376f Replace ifp of ip_moptions and ip6_moptions with if_index
The motivation is the same as the mbuf's rcvif case; avoid having a pointer
of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.

ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6
that's life time is different from ifnet one and so an ifnet object can be
disappeared anytime we get it via them. Thus we need to look up an ifnet
object by if_index every time for safe.
2016-06-21 03:28:27 +00:00
ozaki-r
f634cbd046 Introduce if_index_t 2016-06-21 03:07:54 +00:00
ozaki-r
51db7a24e2 Fix nd6_output (if_output_lock conversion mistake) 2016-06-21 02:14:11 +00:00
knakahara
10b439df13 fix: kern/51259 2016-06-20 22:59:36 +00:00
maya
aa71a1dbfd Fix DEBUG build
While here, if DIAGNOSTIC panic to KASSERTMSG.

ok mlelstv@
2016-06-20 20:19:43 +00:00
christos
f4c1c0d146 put back commented out name resolution code that was gc'ed after previous
refactoring.
2016-06-20 19:14:35 +00:00
skrll
1326a919f5 Fix a comment 2016-06-20 14:18:30 +00:00
msaitoh
f2d4b942df B260 "Slot Power Limit" ECN. PCIe 3.1 ECN. September 18, 2015. 2016-06-20 10:02:43 +00:00
ozaki-r
bdb88f5405 Get rid of invalid KASSERT
The mbuf being checked is allocated in ieee80211_getmgtframe just above,
so checking NULL of its CTX is meaningless.

Pointed out by mlelstv@
2016-06-20 08:57:18 +00:00
knakahara
42837aa3a5 wm(4) can enable IFEF_START_MPSAFE now. 2016-06-20 08:34:59 +00:00
knakahara
69c0ff04b9 apply if_start_lock() to L2 callers which call ifp->if_start() of device derivers 2016-06-20 08:30:58 +00:00
knakahara
910b5ef147 introduce if_start_lock()
if_start_lock() calls ifp->if_start() holding KERNEL_LOCK if it is required.
2016-06-20 08:24:36 +00:00
knakahara
edf75a0767 fix: i386 build failure 2016-06-20 08:18:59 +00:00
knakahara
ded2d2ff82 fix: should not assert IFEF_OUTPUT_MPSAFE in bridge_output() 2016-06-20 08:14:41 +00:00
hannken
cd8006c457 Prevent use after free. Don't free an interrupt source still in use.
Ok: Kengo NAKAHARA
2016-06-20 08:14:06 +00:00
martin
115160e654 Fix a few bounds and instruction sequences generated in the PLT; exercised
by ASLR and verified to work with the aslr fixed random debug sysctls.
2016-06-20 08:12:25 +00:00
knakahara
bf1a57d3d3 fix: i386/ALL build failure 2016-06-20 08:08:13 +00:00
knakahara
0fb3bf480b tentative fix for ATF(net/if_bridge/t_bridge) 2016-06-20 07:23:56 +00:00
skrll
4fbf0ce543 More debug. 2016-06-20 07:13:07 +00:00
skrll
0ef85034cd Set ssc as early as possible 2016-06-20 07:12:00 +00:00
knakahara
16fd605766 make bridge_output MP-safe, so that bridge(4) can enable IFEF_OUTPUT_MPSAFE.
making MP-scalable is future work.
2016-06-20 07:06:06 +00:00
knakahara
58e1ba6e9c make ether_output() MP-safe, so that if_ether can enable IFEF_OUTPUT_MPSAFE.
making MP-scalable is future work.
2016-06-20 07:01:45 +00:00
knakahara
163d060d6a make looutput() MP-safe, so that lo(4) can enable IFEF_OUTPUT_MPSAFE.
making MP-scalable is future work.
2016-06-20 06:52:44 +00:00
knakahara
95fc145695 apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling). 2016-06-20 06:46:37 +00:00
ozaki-r
cb0a0a2168 Do psref_target_destroy after purging packets
Because purging packets may try to send packets, which requires psref yet.
2016-06-20 06:41:30 +00:00
knakahara
6eeb832178 introduce if_output_lock()
if_output_lock() calls ifp->if_output() holding KERNEL_LOCK if it is required.
2016-06-20 06:41:15 +00:00
knakahara
53dcbf18a2 introduce if_extflags (was if__pad1) 2016-06-20 06:35:05 +00:00
pgoyette
1f58493c30 For built-in modules, the iic driver requires i2c_bitbang 2016-06-20 04:18:12 +00:00
dholland
8fd50ded1a In lfs_mknod, don't release dvp until done with it. This was exposed a
while back when I removed a sketchy preprocessor macro scheme, but I'd
left it the way it was at the time and marked it for later. Now I
guess it's later.

Also don't randomly use both dvp and ap->a_dvp; they're the same, so
pick one and stick to it.
2016-06-20 03:55:34 +00:00
dholland
19fcb33956 One more batch of already-synced ufs changes:
ufs_extern.h 1.79 is equivalent to ulfs_extern.h 1.14
ufsmount.h 1.43 is (roughly) equivalent to lfs_extern.h 1.102
ufs_inode.c 1.94 does not apply to lfs
ufs_inode.c 1.95 does not apply to lfs either
ufs_readwrite.c 1.108 is equivalent to ulfs_readwrite.c 1.8
ufs_readwrite.c 1.109 is equivalent to ulfs_readwrite.c 1.9
ufs_readwrite.c 1.110 is equivalent to ulfs_readwrite.c 1.10
ufs_readwrite.c 1.111 does not apply to lfs
ufs_readwrite.c 1.112 is equivalent to ulfs_readwrite.c 1.11
ufs_readwrite.c 1.113 is equivalent to ulfs_readwrite.c 1.13
ufs_readwrite.c 1.114 is equivalent to ulfs_readwrite.c 1.14
ufs_readwrite.c 1.115 is equivalent to ulfs_readwrite.c 1.15
ufs_readwrite.c 1.116-1.118 does not apply to lfs
ufs_readwrite.c 1.119-1.120 are equivalent to ulfs_readwrite.c 1.16
ufs_rename.c 1.12 is equivalent to lfs_rename.c 1.8
ufs_vnops.c 1.226 is equivalent to ulfs_vnops.c 1.22 and lfs_vnops.c 1.270
ufs_vnops.c 1.227 is equivalent to ulfs_vnops.c 1.23
ufs_vnops.c 1.228-1.229 are equivalent to ulfs_vnops.c 1.24
ufs_vnops.c 1.230 is equivalent to ulfs_vnops.c 1.25 and lfs_vnops.c 1.271
ufs_vnops.c 1.231 originated in lfs
ufs_vnops.c 1.232 does not apply to lfs
2016-06-20 03:36:09 +00:00
dholland
8859f77e66 u_int{8,16,32,64}_t -> uint{8,16,32,64}_t in remaining lfs headers. 2016-06-20 03:29:52 +00:00
dholland
83ad3c9ada Massedit u_int{8,16,32,64}_t to uint{8,16,32,64}_t. This effectively
merges ufs/dinode.h 1.25.
2016-06-20 03:25:46 +00:00
dholland
6c6abefb83 Merge ufs_inode.c 1.93: missing unlock on error path. 2016-06-20 03:11:21 +00:00
dholland
d3a125a547 With the previous we seem to have the changes from -r1.225 of ufs_vnops.c.
(as that was stuff from moving ffs to the new vcache and lfs has also been
moved, this is not surprising)
2016-06-20 02:42:08 +00:00
dholland
086154049b ulfs_makeinode -> lfs_makeinode 2016-06-20 02:33:01 +00:00
dholland
b08ea0376c Merge (effectively) -r1.78 of ufs_extern.h: shift ulfs_makeinode to
lfs_vnops.c and make it file-static there, as that's the only place
it's used.
2016-06-20 02:31:47 +00:00
dholland
0261ff7039 Note more already-merged versions:
inode.h 1.68 is subsumed by ulfs_inode.h 1.19
inode.h 1.69-1.72 do not apply to lfs
ufs_extern.h 1.74 was covered when lfs was moved to the new vnode cache
ufs_extern.h 1.75 is equivalent to ulfs_extern.h 1.13
ufs_extern.h 1.76-1.77 do not apply to lfs
ufsmount.h 1.42 does not apply to lfs
ufs_inode.c 1.90 is subsumed by ulfs_inode.c 1.10
ufs_inode.c 1.91-1.92 do not apply to lfs
ufs_lookup.c 1.130 is subsumed by ulfs_lookup.c 1.24
ufs_lookup.c 1.131 is equivalent to ulfs_lookup.c 1.20
ufs_lookup.c 1.132 is equivalent to ulfs_lookup.c 1.21
ufs_lookup.c 1.133 is equivalent to ulfs_lookup.c 1.22
ufs_lookup.c 1.134 is equivalent to ulfs_lookup.c 1.23
ufs_lookup.c 1.135 is equivalent to ulfs_lookup.c 1.25
ufs_quota2.c 1.38 is equivalent to ulfs_quota2.c 1.17
ufs_quota2.c 1.39 is equivalent to ulfs_quota2.c 1.16
ufs_quota2.c 1.40 is equivalent to ulfs_quota2.c 1.18
ufs_vfsops.c 1.53 is subsumed by lfs_vfsops.c 1.324
ufs_vfsops.c 1.54 is subsumed by lfs_vfsops.c 1.324
ufs_vnops.c 1.223-1.224 do not apply to lfs
2016-06-20 02:25:03 +00:00
dholland
63ee8614ac fix typo in previous 2016-06-20 02:05:25 +00:00
dholland
3135a5d8c6 Merge some cosmetic changes from ffs_quota2.c 1.5. I didn't merge the
whitespace changes.
2016-06-20 02:03:32 +00:00
dholland
18ffab73e0 Merge -r1.11 of extattr.h:
Bump UFS1 extended attribute max name length to 256
2016-06-20 01:56:21 +00:00
dholland
1815c2e12d Merge -r1.37 of ufs_dirhash.c:
clear i_dirhash sooner, but what lock protects it?
2016-06-20 01:53:38 +00:00
dholland
15348ccc13 Merge -r1.46 of ufs_extattr.c: Fix uninitialized mutex usage 2016-06-20 01:50:13 +00:00
dholland
762a526551 Merge -r1.45 of ufs_extattr.c:
Fix UFS1 extended attribute backend autocreation deadlock
2016-06-20 01:47:58 +00:00