git: 9208c8bf1874 - main - unix: in sendfile method mark bufs as M_BLOCKED if not ready data present
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 May 2025 19:34:42 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=9208c8bf187484f5987a3ad68b3787dfe90cb7c5
commit 9208c8bf187484f5987a3ad68b3787dfe90cb7c5
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-05-06 19:31:27 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-05-06 19:34:27 +0000
unix: in sendfile method mark bufs as M_BLOCKED if not ready data present
Fixes: d15792780760ef94647af9b377b5f0a80e1826bc
---
sys/kern/uipc_usrreq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 95904d2b9be5..1722a43a800e 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -2436,8 +2436,11 @@ uipc_sendfile(struct socket *so, int flags, struct mbuf *m,
sb->sb_acc += mc.mc_len;
wakeup = true;
}
- } else
+ } else {
+ STAILQ_FOREACH(m, &mc.mc_q, m_stailq)
+ m->m_flags |= M_BLOCKED;
wakeup = false;
+ }
STAILQ_CONCAT(&sb->uxst_mbq, &mc.mc_q);
UIPC_STREAM_SBCHECK(sb);
if (wakeup)