Page MenuHomeFreeBSD

D60830.diff
No OneTemporary

D60830.diff

diff --git a/sys/net/vnet.h b/sys/net/vnet.h
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -290,8 +290,9 @@
#define VNET_DEFINE_STATIC(t, n) \
static t VNET_NAME(n) __section(VNET_SETNAME) __used
#endif
-#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \
- ((b) + (uintptr_t)&VNET_NAME(n))
+#define _VNET_PTR(b, n) __unsafe_forge_single( \
+ __typeof(VNET_NAME(n)) *, \
+ (b) + (uintptr_t)&VNET_NAME(n))
#define _VNET(b, n) (*_VNET_PTR(b, n))
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -518,8 +518,8 @@
struct tseg_qent *q, *last, *first;
struct tseg_qent *p = NULL;
struct tseg_qent *nq = NULL;
- struct tseg_qent *te = NULL;
- struct mbuf *mlast = NULL;
+ struct tseg_qent * __single te = NULL;
+ struct mbuf * __single mlast = NULL;
struct inpcb *inp = tptoinpcb(tp);
struct socket *so = tptosocket(tp);
struct sockbuf *sb = &so->so_rcv;
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -891,7 +891,8 @@
#define TOF_MAXOPT 0x0200
u_int32_t to_tsval; /* new timestamp */
u_int32_t to_tsecr; /* reflected timestamp */
- u_char *to_sacks; /* pointer to the first SACK blocks */
+ u_char * __sized_by(to_nsacks * TCPOLEN_SACK)
+ to_sacks; /* pointer to the first SACK blocks */
u_char *to_signature; /* pointer to the TCP-MD5 signature */
u_int8_t *to_tfo_cookie; /* pointer to the TFO cookie */
u_int16_t to_mss; /* maximum segment size */

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 19, 3:09 AM (18 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41029694
Default Alt Text
D60830.diff (1 KB)

Event Timeline