Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netisdn Initialize some members in a mbuf which is on st...
details: https://anonhg.NetBSD.org/src/rev/426f87e44087
branches: trunk
changeset: 991664:426f87e44087
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Jul 25 07:55:44 2018 +0000
description:
Initialize some members in a mbuf which is on stack.
diffstat:
sys/dev/ic/bwi.c | 5 +++--
sys/dev/pci/if_txp.c | 5 +++--
sys/dev/ppbus/if_plip.c | 8 ++++++--
sys/net/bpf.c | 11 +++++++++--
sys/netisdn/i4b_ipr.c | 9 +++++++--
5 files changed, 28 insertions(+), 10 deletions(-)
diffs (168 lines):
diff -r 514c4026e91b -r 426f87e44087 sys/dev/ic/bwi.c
--- a/sys/dev/ic/bwi.c Wed Jul 25 05:29:58 2018 +0000
+++ b/sys/dev/ic/bwi.c Wed Jul 25 07:55:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwi.c,v 1.34 2018/06/26 06:48:00 msaitoh Exp $ */
+/* $NetBSD: bwi.c,v 1.35 2018/07/25 07:55:44 msaitoh Exp $ */
/* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */
/*
@@ -48,7 +48,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.34 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.35 2018/07/25 07:55:44 msaitoh Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -8529,6 +8529,7 @@
mb.m_len = sc->sc_rxtap_len;
mb.m_next = m;
mb.m_nextpkt = NULL;
+ mb.m_owner = NULL;
mb.m_type = 0;
mb.m_flags = 0;
bpf_mtap3(sc->sc_drvbpf, &mb, BPF_D_IN);
diff -r 514c4026e91b -r 426f87e44087 sys/dev/pci/if_txp.c
--- a/sys/dev/pci/if_txp.c Wed Jul 25 05:29:58 2018 +0000
+++ b/sys/dev/pci/if_txp.c Wed Jul 25 07:55:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txp.c,v 1.49 2018/06/26 06:48:01 msaitoh Exp $ */
+/* $NetBSD: if_txp.c,v 1.50 2018/07/25 07:55:44 msaitoh Exp $ */
/*
* Copyright (c) 2001
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.49 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.50 2018/07/25 07:55:44 msaitoh Exp $");
#include "opt_inet.h"
@@ -569,6 +569,7 @@
*/
m.m_type = MT_DATA;
m.m_next = m.m_nextpkt = NULL;
+ m.m_owner = NULL;
m.m_len = le32toh(sect->nbytes);
m.m_data = dma.dma_vaddr;
m.m_flags = 0;
diff -r 514c4026e91b -r 426f87e44087 sys/dev/ppbus/if_plip.c
--- a/sys/dev/ppbus/if_plip.c Wed Jul 25 05:29:58 2018 +0000
+++ b/sys/dev/ppbus/if_plip.c Wed Jul 25 07:55:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.30 2018/06/26 06:48:02 msaitoh Exp $ */
+/* $NetBSD: if_plip.c,v 1.31 2018/07/25 07:55:45 msaitoh Exp $ */
/*-
* Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.30 2018/06/26 06:48:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.31 2018/07/25 07:55:45 msaitoh Exp $");
/*
* Parallel port TCP/IP interfaces added. I looked at the driver from
@@ -523,9 +523,13 @@
u_int32_t af = AF_INET;
struct mbuf m0;
+ m0.m_type = MT_DATA;
m0.m_next = m;
+ m0.m_nextpkt = NULL;
+ m0.m_owner = NULL;
m0.m_len = sizeof(u_int32_t);
m0.m_data = (char *)⁡
+ m0.m_flags = 0;
bpf_mtap(ifp, &m0, direction);
}
diff -r 514c4026e91b -r 426f87e44087 sys/net/bpf.c
--- a/sys/net/bpf.c Wed Jul 25 05:29:58 2018 +0000
+++ b/sys/net/bpf.c Wed Jul 25 07:55:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf.c,v 1.226 2018/06/26 06:48:02 msaitoh Exp $ */
+/* $NetBSD: bpf.c,v 1.227 2018/07/25 07:55:45 msaitoh Exp $ */
/*
* Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.226 2018/06/26 06:48:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.227 2018/07/25 07:55:45 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_bpf.h"
@@ -1650,6 +1650,7 @@
* absolutely needed--this mbuf should never go anywhere else.
*/
(void)memset(&mb, 0, sizeof(mb));
+ mb.m_type = MT_DATA;
mb.m_next = m;
mb.m_data = data;
mb.m_len = dlen;
@@ -1700,8 +1701,11 @@
{
struct mbuf m0;
+ m0.m_type = MT_DATA;
m0.m_flags = 0;
m0.m_next = m;
+ m0.m_nextpkt = NULL;
+ m0.m_owner = NULL;
m0.m_len = 4;
m0.m_data = (char *)⁡
@@ -1743,8 +1747,11 @@
struct mbuf m0;
u_char *hp;
+ m0.m_type = MT_DATA;
m0.m_flags = 0;
m0.m_next = m;
+ m0.m_nextpkt = NULL;
+ m0.m_owner = NULL;
m0.m_data = m0.m_dat;
m0.m_len = SLIP_HDRLEN;
diff -r 514c4026e91b -r 426f87e44087 sys/netisdn/i4b_ipr.c
--- a/sys/netisdn/i4b_ipr.c Wed Jul 25 05:29:58 2018 +0000
+++ b/sys/netisdn/i4b_ipr.c Wed Jul 25 07:55:44 2018 +0000
@@ -27,7 +27,7 @@
* i4b_ipr.c - isdn4bsd IP over raw HDLC ISDN network driver
* ---------------------------------------------------------
*
- * $Id: i4b_ipr.c,v 1.45 2018/06/26 06:48:03 msaitoh Exp $
+ * $Id: i4b_ipr.c,v 1.46 2018/07/25 07:55:45 msaitoh Exp $
*
* $FreeBSD$
*
@@ -59,7 +59,7 @@
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.45 2018/06/26 06:48:03 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.46 2018/07/25 07:55:45 msaitoh Exp $");
#include "irip.h"
#include "opt_irip.h"
@@ -1066,7 +1066,12 @@
/* prepend the address family as a four byte field */
struct mbuf mm;
u_int af = AF_INET;
+
+ mm.m_type = MT_DATA;
+ mm.m_flags = 0;
mm.m_next = m;
+ mm.m_nextpkt = NULL;
+ mm.m_owner = NULL;
mm.m_len = 4;
mm.m_data = (char *)⁡
Home |
Main Index |
Thread Index |
Old Index