Date: Fri, 28 Jun 2019 04:02:57 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349501 - head/sys/dev/cxgbe/tom Message-ID: <201906280402.x5S42vnm083699@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906280402.x5S42vnm083699>