Make sure the VNET is properly set when calling tcp_drop() from

the ktls taskqueue callback function.

A valid VNET is needed when updating statistics.

panic()
tcp_state_change()
tcp_drop()
ktls_reset_send_tag()
taskqueue_run_locked()
taskqueue_thread_loop()

Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky
2020-01-21 11:43:25 +00:00
parent 2a466bc451
commit 1f69a50940
+2
View File
@@ -1141,7 +1141,9 @@ ktls_reset_send_tag(void *context, int pending)
if (!(inp->inp_flags & INP_TIMEWAIT) &&
!(inp->inp_flags & INP_DROPPED)) {
tp = intotcpcb(inp);
CURVNET_SET(tp->t_vnet);
tp = tcp_drop(tp, ECONNABORTED);
CURVNET_RESTORE();
if (tp != NULL)
INP_WUNLOCK(inp);
counter_u64_add(ktls_ifnet_reset_dropped, 1);