Go to file
ozaki-r 1c27f64d6f Fix a deadlock between a route update and lltable
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.

If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.

A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update

Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.

Note that the deadlock happens only if NET_MPSAFE is enabled.
2017-11-10 07:24:28 +00:00
bin Remove Tn. 2017-10-30 15:38:52 +00:00
common Simplify, and comment out xrefs to non-existing pages. 2017-10-23 00:59:44 +00:00
compat Don't mix abis in any CRUNCHEDPROG 2017-01-05 21:28:42 +00:00
crypto fix typo. (does not affect actual operation, but confuses reader...) 2017-11-09 08:34:50 +00:00
dist/pf PR 50709 David Binderman: memory leak 2016-05-30 17:21:07 +00:00
distrib Trailing whitespace 2017-11-09 21:36:46 +00:00
doc Add matt-nb8-mediatek branch 2017-11-08 20:24:53 +00:00
etc Add net/ipsec debug lib directory 2017-11-01 08:32:07 +00:00
external Don't get stuck reading named pipes; only try to read plain files in 2017-11-09 15:03:01 +00:00
extsrc
games Include time.h for time. Drop sys/types.h and expect basic working 2017-10-02 22:03:10 +00:00
include Add endian.h header. Simply includes sys/endian.h 2017-10-16 11:38:25 +00:00
lib Add O_REGULAR to enforce opening of only regular files 2017-11-09 20:30:01 +00:00
libexec init/fini for the main program is handled by crt0.o, so ifunc handling 2017-11-06 21:16:03 +00:00
regress Don't test call gates, they are not supported anymore. 2017-08-30 15:46:19 +00:00
rescue Extra flags for static PIE 2017-10-08 15:02:33 +00:00
sbin user librumpres 2017-10-10 19:30:06 +00:00
share document kmem_strdupsize/kmem_strdupfree 2017-11-07 18:36:27 +00:00
sys Fix a deadlock between a route update and lltable 2017-11-10 07:24:28 +00:00
tests Dedup some checks 2017-11-09 04:51:07 +00:00
tools use the variable for the source dir instead of duplicating it. 2017-10-04 21:42:20 +00:00
usr.bin Only open regular files. 2017-11-09 20:27:50 +00:00
usr.sbin Initialize boot_catalog_entry's entry_type properly. 2017-11-09 01:28:05 +00:00
build.sh Better validation of var name args to -V and -Z, in a way that makes 2017-10-08 01:05:13 +00:00
BUILDING regen 2017-10-21 23:49:28 +00:00
Makefile Add NOBINARIES, useful to build tools are libraries which is what's needed 2017-10-04 23:54:33 +00:00
Makefile.inc
UPDATING Note possible need to clean objdir (or depends at least) for 2017-10-13 07:04:58 +00:00