| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
functions to pave way for more fine grained locking.
Suggested by, comments & OK mpi
|
|
|
|
|
|
|
|
| |
top->m_pkthdr.len was accessed without check. See CID 1452933.
In fact top cannot be NULL there and the condition was always false.
m_getuio() did never reserve space for the header. The correct
check is m == top to find the first mbuf.
OK visa@
|
|
|
|
|
|
|
| |
in sorflush(), but in other places it is. See CID 1453099. The
flags SB_NOINTR and M_WAITOK should avoid failure. Put an assert
there to be sure.
OK visa@ mpi@
|
|
|
|
|
|
| |
all the callers to call m_freem(9).
Support from deraadt@ and tedu@, ok visa@, bluhm@
|
|
|
|
|
|
|
|
|
|
| |
Move a blocking memory allocation out of the socket lock and create
a simpler alloc/free pattern to review. Now both m_get() and m_free()
are in the same place.
Discussed with bluhm@.
Encouragements from deraadt@ and tedu@, ok kettenis@, florian@, visa@
|
|
|
|
| |
ok phessler@, visa@, bluhm@
|
|
|
|
| |
OK mpi@ visa@
|
|
|
|
|
|
|
| |
Protect the fields modifieds by sosetopt() and simplify the dance
with the stars.
ok bluhm@
|
|
|
|
|
|
| |
selwakeup().
ok bluhm@
|
|
|
|
|
|
|
| |
As a side effect, soconnect() and soconnect2() now expect a locked socket,
so update all the callers.
ok bluhm@
|
|
|
|
|
|
|
| |
splicing, another process may allocate it in the meantime. Then
one of the splicing structures leaked in sosplice(). Recheck that
no struct sosplice exists after a protential sleep.
reported by Ilja Van Sprundel; OK mpi@
|
|
|
|
| |
ok bluhm@, claudio@, visa@
|
|
|
|
|
| |
been acquired in sosend(). Fixes a kernel lock assertion panic.
OK visa@ mpi@
|
|
|
|
|
|
|
| |
It is unsafe to sleep while iterating the list of pending events in
kqueue_scan().
Reported by abieber@ and juanfra@
|
|
|
|
|
|
| |
Implicitely protects `so_state' with the socket lock in sosend().
ok visa@, bluhm@
|
|
|
|
|
|
| |
kqueue filters.
ok millert@, bluhm@, visa@
|
|
|
|
|
|
| |
While here document an abuse of parent socket's lock.
Problem reported by krw@, analysis and ok bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffers.
This is one step towards unlocking TCP input path. Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.
Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures. Logic
and name taken from NetBSD.
Tested by Hrvoje Popovski.
ok claudio@, bluhm@, mikeb@
|
| |
|
|
|
|
|
|
|
|
| |
to grab the rwlock.
Problem reported by Rivo Nurges.
ok bluhm@
|
|
|
|
| |
ok deraadt bluhm
|
|
|
|
|
|
| |
Only pfkeyv2_send() needs the NET_LOCK() so grab it at the start and release
at the end. This should allow to push the locks down in other places.
OK mpi@, bluhm@
|
|
|
|
|
|
|
| |
safe since we're always holding the KERNEL_LOCK() but we want to move
away from that.
Suggested by and ok bluhm@
|
|
|
|
|
|
| |
Recursions are still marked as XXXSMP.
ok deraadt@, bluhm@
|
|
|
|
| |
ok guenther
|
|
|
|
|
|
|
|
|
| |
For the moment the NET_LOCK() is always taken by threads running under
KERNEL_LOCK(). That means it doesn't buy us anything except a possible
deadlock that we did not spot. So make sure this doesn't happen, we'll
have plenty of time in the next release cycle to stress test it.
ok visa@
|
|
|
|
|
|
|
| |
Attach is quite a different thing to the other PRU functions and
this should make locking a bit simpler. This also removes the ugly
hack on how proto was passed to the attach function.
OK bluhm@ and mpi@ on a previous version
|
|
|
|
|
|
|
|
| |
The only function that need the lock is rtm_output() as it messes with
the routing table. So grab the lock there since it is safe to sleep
in a process context.
ok bluhm@
|
|
|
|
|
|
|
|
|
| |
Always defere soreceive() to an nfsd(8) process instead of doing it in
the 'softnet' thread. Avoiding this recursion ensure that we do not
introduce a new sleeping point by releasing and grabbing the netlock.
Tested by many, committing now in order to find possible performance
regression.
|
|
|
|
|
|
|
|
| |
unix domain sockets.
This should prevent the multiple deadlock related to unix domain sockets.
Inputs from millert@ and bluhm@, ok bluhm@
|
|
|
|
|
|
|
|
| |
the netlock held. This also changes the prototypes of the *ctloutput
functions to take an mbuf instead of an mbuf pointer.
help, guidance from bluhm@ and mpi@
ok bluhm@
|
|
|
|
|
|
|
| |
passing is checked. As the data type has changed in unp_internalize(),
the calculation has to be adapted in sosend().
Found by relayd regress test on i386.
OK millert@
|
|
|
|
|
|
| |
necessary to lock code that initializes a new socket structure
before it has been linked to any global list.
OK mpi@
|
|
|
|
|
| |
the TASKQ_CANTSLEEP flag is no longer valid for the splicing thread.
OK mikeb@
|
|
|
|
|
|
| |
Recursions are currently known and marked a XXXSMP.
Please report any assert to bugs@
|
|
|
|
|
|
|
|
|
|
|
| |
splsoftnet()/splx() until the known issues are fixed.
In other words, stop using a rwlock since it creates a deadlock when
chrome is used.
Issue reported by Dimitris Papastamos and kettenis@
ok visa@
|
|
|
|
| |
ok rzalamena@, bluhm@
|
|
|
|
|
|
|
|
|
|
|
| |
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.
This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.
Inputs from and ok bluhm@, ok dlg@
|
|
|
|
|
|
| |
NULL tests.
ok mpi@
|
|
|
|
|
|
|
| |
reduced buffer size. If the send buffer size is less than the size
of a single mbuf, it will never fit. So if the send buffer is
empty, split the large mbuf and move only a part.
OK claudio@
|
|
|
|
|
|
|
| |
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@
|
|
|
|
|
|
|
| |
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@, claudio@
|
|
|
|
|
|
|
|
| |
splnet() was necessary when link state changes were executed from
hardware interrupt handlers, nowdays all the changes are serialized
by the KERNEL_LOCK() so assert that it is held instead.
ok mikeb@
|
|
|
|
|
| |
splsoftnet() if the function does a splsoftassert(IPL_SOFTNET)
anyway.
|
|
|
|
| |
From mpi@'s netlock diff; OK mikeb@
|
|
|
|
|
| |
we enter networking code. Fixes an splassert() found by David Hill.
OK mikeb@
|
|
|
|
|
|
| |
places for the upcoming network lock. This might trigger some
asserts, but we have to find the missing code paths.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
|
|
|
|
|
| |
This is not an issue right now, but it will become one when an non
recursive lock will be used.
ok claudio@
|
|
|
|
|
| |
fallback.
OK claudio@
|