Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2025 19:34:41 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 964fe0fd4d52 - main - unix: fix skipping of M_NOTREADY mbufs in unp_dispose()
Message-ID:  <202505061934.546JYfFo056526@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

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

commit 964fe0fd4d522c218cb73429e6304ce26ba61b50
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-05-06 19:24:07 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-05-06 19:34:26 +0000

    unix: fix skipping of M_NOTREADY mbufs in unp_dispose()
    
    Of course the loop variable doesn't need to be updated here.
    
    Fixes:  d15792780760ef94647af9b377b5f0a80e1826bc
---
 sys/kern/uipc_usrreq.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 06b3317dc775..95904d2b9be5 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -4213,10 +4213,9 @@ unp_dispose(struct socket *so)
 			while (m != NULL && m->m_flags & M_NOTREADY)
 				m = m->m_next;
 			for (prev = n = m; n != NULL; n = n->m_next) {
-				if (n->m_flags & M_NOTREADY) {
-					n = n->m_next;
-					prev->m_next = n;
-				} else
+				if (n->m_flags & M_NOTREADY)
+					prev->m_next = n->m_next;
+				else
 					prev = n;
 			}
 			sb->uxst_fnrdy = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505061934.546JYfFo056526>