diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -908,6 +909,7 @@ if (m == NULL) return; + kmsan_check_mbuf(m, "sbappend"); sbm_clrprotoflags(m, flags); SBLASTRECORDCHK(sb); n = sb->sb_mb; @@ -1022,6 +1024,8 @@ KASSERT(m->m_nextpkt == NULL,("sbappendstream 0")); + kmsan_check_mbuf(m, "sbappend"); + #ifdef KERN_TLS /* * Decrypted TLS records are appended as records via @@ -1170,7 +1174,10 @@ if (m0 == NULL) return; + + kmsan_check_mbuf(m0, "sbappend"); m_clrprotoflags(m0); + /* * Put the first mbuf on the queue. Note this permits zero length * records. @@ -1207,6 +1214,12 @@ struct mbuf *m0, struct mbuf *control, struct mbuf *ctrl_last) { struct mbuf *m, *n, *nlast; + + if (m0 != NULL) + kmsan_check_mbuf(m0, "sbappend"); + if (control != NULL) + kmsan_check_mbuf(control, "sbappend"); + #if MSIZE <= 256 if (asa->sa_len > MLEN) return (0); @@ -1317,6 +1330,9 @@ { struct mbuf *m, *mlast; + kmsan_check_mbuf(m0, "sbappend"); + kmsan_check_mbuf(control, "sbappend"); + sbm_clrprotoflags(m0, flags); m_last(control)->m_next = m0;