Page MenuHomeFreeBSD

D38101.diff
No OneTemporary

D38101.diff

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 <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/msan.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/protosw.h>
@@ -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;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 8:18 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14673123
Default Alt Text
D38101.diff (1 KB)

Event Timeline