Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys
Module Name: src
Committed By: ozaki-r
Date: Fri Nov 10 07:24:28 UTC 2017
Modified Files:
src/sys/net: if_llatbl.c if_llatbl.h
src/sys/netinet: if_arp.c in.c
src/sys/netinet6: in6.c nd6.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.12 -r1.13 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.253 -r1.254 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.208 -r1.209 src/sys/netinet/in.c
cvs rdiff -u -r1.249 -r1.250 src/sys/netinet6/in6.c
cvs rdiff -u -r1.236 -r1.237 src/sys/netinet6/nd6.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index