On Mon, Jan 09, 2017 at 04:10:48PM +0100, Martin Pieuchot wrote: > As reported by Hrvoje Popovski, these two callbacks also need the > NET_LOCK(): > > splassert: ip_output: want 1 have 0 > Starting stack trace... > ip_output() at ip_output+0x7d > pfsync_sendout() at pfsync_sendout+0x499 > pfsync_update_tdb() at pfsync_update_tdb+0x13a > esp_input_cb() at esp_input_cb+0x234 > taskq_thread() at taskq_thread+0x6c > end trace frame: 0x0, count: 252 > End of stack trace. > > ok?
ok visa@ I guess ipcomp needs similar treatment: Index: netinet/ip_ipcomp.c =================================================================== RCS file: src/sys/netinet/ip_ipcomp.c,v retrieving revision 1.49 diff -u -p -r1.49 ip_ipcomp.c --- netinet/ip_ipcomp.c 24 Dec 2016 11:17:35 -0000 1.49 +++ netinet/ip_ipcomp.c 9 Jan 2017 16:39:16 -0000 @@ -217,7 +217,7 @@ ipcomp_input_cb(struct cryptop *crp) return (EINVAL); } - s = splsoftnet(); + NET_LOCK(s); tdb = gettdb(tc->tc_rdomain, tc->tc_spi, &tc->tc_dst, tc->tc_proto); if (tdb == NULL) { @@ -254,7 +254,7 @@ ipcomp_input_cb(struct cryptop *crp) /* Reset the session ID */ if (tdb->tdb_cryptoid != 0) tdb->tdb_cryptoid = crp->crp_sid; - splx(s); + NET_UNLOCK(s); return crypto_dispatch(crp); } free(tc, M_XDATA, 0); @@ -336,11 +336,11 @@ ipcomp_input_cb(struct cryptop *crp) /* Back to generic IPsec input processing */ error = ipsec_common_input_cb(m, tdb, skip, protoff); - splx(s); + NET_UNLOCK(s); return error; baddone: - splx(s); + NET_UNLOCK(s); m_freem(m);