Date: Mon, 19 Oct 2020 18:24:06 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366845 - head/sys/kern Message-ID: <202010191824.09JIO66a097800@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Oct 19 18:24:06 2020 New Revision: 366845 URL: https://svnweb.freebsd.org/changeset/base/366845 Log: Check TF_TOE not the tod pointer to determine if TOE is active. The TF_TOE flag is the check used in the rest of the network stack to determine if TOE is active on a socket. There is at least one path in the cxgbe(4) TOE driver that can leave the tod pointer non-NULL on a socket not using TOE. Reported by: Sony Arpita Das <sonyarpitad@chelsio.com> Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D26803 Modified: head/sys/kern/uipc_ktls.c Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Mon Oct 19 18:21:41 2020 (r366844) +++ head/sys/kern/uipc_ktls.c Mon Oct 19 18:24:06 2020 (r366845) @@ -734,7 +734,7 @@ ktls_try_toe(struct socket *so, struct ktls_session *t return (ECONNRESET); } tp = intotcpcb(inp); - if (tp->tod == NULL) { + if (!(tp->t_flags & TF_TOE)) { INP_WUNLOCK(inp); return (EOPNOTSUPP); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010191824.09JIO66a097800>