svn commit: r349501 - head/sys/dev/cxgbe/tom
Navdeep Parhar
np at FreeBSD.org
Fri Jun 28 04:02:58 UTC 2019
Author: np
Date: Fri Jun 28 04:02:56 2019
New Revision: 349501
URL: https://svnweb.freebsd.org/changeset/base/349501
Log:
cxgbe/t4_tom: Mark the socket's receive as done before calling
handle_ddp_close.
This eliminates a bad race where an aio_ddp_requeue that happened to run
after handle_ddp_close could bump up the active count.
Discussed with: jhb@
MFC after: 3 days
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/tom/t4_cpl_io.c
Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Jun 28 02:41:17 2019 (r349500)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Jun 28 04:02:56 2019 (r349501)
@@ -1253,6 +1253,7 @@ do_peer_close(struct sge_iq *iq, const struct rss_head
tp->rcv_nxt++; /* FIN */
so = inp->inp_socket;
+ socantrcvmore(so);
if (toep->ulp_mode == ULP_MODE_TCPDDP) {
DDP_LOCK(toep);
if (__predict_false(toep->ddp.flags &
@@ -1260,7 +1261,6 @@ do_peer_close(struct sge_iq *iq, const struct rss_head
handle_ddp_close(toep, tp, cpl->rcv_nxt);
DDP_UNLOCK(toep);
}
- socantrcvmore(so);
if (toep->ulp_mode != ULP_MODE_RDMA) {
KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt),
More information about the svn-src-all
mailing list