git: 964fe0fd4d52 - main - unix: fix skipping of M_NOTREADY mbufs in unp_dispose()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 May 2025 19:34:41 UTC
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;