git: ae51594c9794 - stable/12 - udp: Fix soroverflow SOCKBUF unlocking

Kevin Bowling kbowling at FreeBSD.org
Wed Aug 11 02:34:27 UTC 2021


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

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

commit ae51594c9794275073c955ad4c6fa7ad9fcc1614
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 02:00:09 +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 2a5e8fdd25c2..f57a9059a7db 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -376,7 +376,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