Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2025 19:34:42 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: 9208c8bf1874 - main - unix: in sendfile method mark bufs as M_BLOCKED if not ready data present
Message-ID:  <202505061934.546JYgGE056560@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=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)



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