Module Name: src Committed By: ozaki-r Date: Thu Nov 30 02:45:12 UTC 2017
Modified Files: src/sys/netipsec: key.c Log Message: Fix a deadlock happening if !NET_MPSAFE If NET_MPSAFE isn't set, key_timehandler_work is executed with holding softnet_lock. This means that localcount_drain can be called with holding softnet_lock resulting in a deadlock that localcount_drain waits for packet processing to release a reference to SP/SA while network processing is prevented by softnet_lock. Fix the deadlock by not taking softnet_lock in key_timehandler_work. It's okay because IPsec is MP-safe even if !NET_MPSAFE. Note that the change also needs to enable pserialize_perform because the IPsec code can be run in parallel now. Reported by christos@ To generate a diff of this commit: cvs rdiff -u -r1.244 -r1.245 src/sys/netipsec/key.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.