git: 39756885633f - main - rack: honor prior socket buffer lock when doing the upcall

Richard Scheffenegger rscheff at FreeBSD.org
Fri May 21 22:16:04 UTC 2021


The branch main has been updated by rscheff:

URL: https://cgit.FreeBSD.org/src/commit/?id=39756885633fd9d9649b4cb0f0abf594bfeb8dbb

commit 39756885633fd9d9649b4cb0f0abf594bfeb8dbb
Author:     Richard Scheffenegger <rscheff at FreeBSD.org>
AuthorDate: 2021-05-21 22:08:56 +0000
Commit:     Richard Scheffenegger <rscheff at FreeBSD.org>
CommitDate: 2021-05-21 22:09:59 +0000

    rack: honor prior socket buffer lock when doing the upcall
    
    While partially reverting D24237 with D29690, due to introducing some
    unintended effects for in-kernel TCP consumers, the preexisting lock
    on the socket send buffer was not considered properly.
    
    Found by: markj
    MFC after: 2 weeks
    Reviewed By: tuexen, #transport
    Sponsored by: NetApp, Inc.
    Differential Revision: https://reviews.freebsd.org/D30390
---
 sys/netinet/tcp_stacks/rack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index efab90a2e5bd..47f4c6835de9 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -10629,7 +10629,7 @@ rack_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 		rack_adjust_sendmap(rack, &so->so_snd, tp->snd_una);
 		/* Wake up the socket if we have room to write more */
 		rack_log_wakeup(tp,rack, &so->so_snd, acked, 2);
-		sowwakeup(so);
+		sowwakeup_locked(so);
 		m_freem(mfree);
 		tp->t_rxtshift = 0;
 		RACK_TCPT_RANGESET(tp->t_rxtcur, RACK_REXMTVAL(tp),
@@ -13154,7 +13154,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
 			rack_adjust_sendmap(rack, &so->so_snd, tp->snd_una);
 			/* Wake up the socket if we have room to write more */
 			rack_log_wakeup(tp,rack, &so->so_snd, acked, 2);
-			sowwakeup(so);
+			sowwakeup_locked(so);
 			m_freem(mfree);
 		}
 		/* update progress */


More information about the dev-commits-src-main mailing list