git: 2141aab35b70 - stable/13 - udp: Fix soroverflow SOCKBUF unlocking

Kevin Bowling kbowling at FreeBSD.org
Wed Aug 11 01:57:57 UTC 2021


The branch stable/13 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=2141aab35b70b0bf29d6ff9bd39d0cf7e2bd7e11

commit 2141aab35b70b0bf29d6ff9bd39d0cf7e2bd7e11
Author:     Konstantin Kukushkin <darkdestructor at rambler.ru>
AuthorDate: 2021-08-01 14:41:38 +0000
Commit:     Kevin Bowling <kbowling at FreeBSD.org>
CommitDate: 2021-08-11 01:54:18 +0000

    udp: Fix soroverflow SOCKBUF unlocking
    
    We hold the SOCKBUF_LOCK so use soroverflow_locked here.
    This bug may manifest as a non-killable process stuck in [*so_rcv].
    
    Approved by:    scottl
    Reviewed by:    Roy Marples <roy at marples.name>
    Fixes:  7045b1603bdf
    MFC after:  10 days
    Differential Revision:  https://reviews.freebsd.org/D31374
    
    (cherry picked from commit a61c24ddb7d677337d6184ffcee34a6e902d72d7)
---
 sys/netinet/udp_usrreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index ed79ddce5109..76ed063391eb 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -379,7 +379,7 @@ udp_append(struct inpcb *inp, struct ip *ip, struct mbuf *n, int off,
 	so = inp->inp_socket;
 	SOCKBUF_LOCK(&so->so_rcv);
 	if (sbappendaddr_locked(&so->so_rcv, append_sa, n, opts) == 0) {
-		soroverflow(so);
+		soroverflow_locked(so);
 		m_freem(n);
 		if (opts)
 			m_freem(opts);


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