cxgbe/t4_tom: Do not attempt to look up entries in the TCB history if

it hasn't been initialized.

This fixes a bug in r346570 that could cause a panic when servicing
TCP_INFO for offloaded connections.

MFC after:	3 days
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2019-05-30 17:27:40 +00:00
parent 885f5b4a47
commit 35c0026f42

View File

@ -537,6 +537,9 @@ lookup_tcb_histent(struct adapter *sc, u_int tid, bool addrem)
MPASS(tid < sc->tids.ntids);
if (td->tcb_history == NULL)
return (NULL);
if (addrem)
rw_wlock(&td->tcb_history_lock);
else