The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=57d5a8feda3fd25a650eaab5998db13633d62d2d
commit 57d5a8feda3fd25a650eaab5998db13633d62d2d Author: Ahmad Khalifa <[email protected]> AuthorDate: 2025-09-24 15:01:57 +0000 Commit: Ahmad Khalifa <[email protected]> CommitDate: 2025-09-24 15:03:12 +0000 ng_tty: don't increment m_data Stop incrementing m_data so the callee can read the mbuf. MFC after: 3 days Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D52702 --- sys/netgraph/ng_tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 6f8667c664bb..c7d8a1b64eac 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -485,9 +485,7 @@ ngt_rint(struct tty *tp, char c, int flags) } /* Add char to mbuf */ - *mtod(m, u_char *) = c; - m->m_data++; - m->m_len++; + *(u_char *)mtodo(m, m->m_len++) = c; m->m_pkthdr.len++; /* Ship off mbuf if it's time */
