Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys Pull up following revision(s) (requested by martin in...
details: https://anonhg.NetBSD.org/src/rev/764cd55b764d
branches: netbsd-7
changeset: 800616:764cd55b764d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jan 29 07:56:59 2019 +0000
description:
Pull up following revision(s) (requested by martin in ticket #1676):
sys/net/link_proto.c 1.37
sys/netatalk/ddp_usrreq.c 1.72
sys/netbt/hci_socket.c 1.46
sys/netbt/l2cap_socket.c 1.36
sys/netbt/rfcomm_socket.c 1.38
sys/netbt/sco_socket.c 1.38
sys/netinet/tcp_usrreq.c 1.223 via patch
sys/netinet6/raw_ip6.c 1.173
sys/netinet6/udp6_usrreq.c 1.146
sys/netmpls/mpls_proto.c 1.32
sys/netnatm/natm.c patch
Fix memory leaks pointed out by Ilja Van Sprundel: all
sendoob() functions are expted to free both passed
mbuf chains.
diffstat:
sys/net/link_proto.c | 7 +++++--
sys/netatalk/ddp_usrreq.c | 8 ++++----
sys/netbt/hci_socket.c | 10 ++++------
sys/netbt/l2cap_socket.c | 10 ++++------
sys/netbt/rfcomm_socket.c | 10 ++++------
sys/netbt/sco_socket.c | 10 ++++------
sys/netinet/tcp_usrreq.c | 11 ++++++++---
sys/netinet6/raw_ip6.c | 8 ++++----
sys/netinet6/udp6_usrreq.c | 10 ++++------
sys/netmpls/mpls_proto.c | 7 +++++--
sys/netnatm/natm.c | 7 +++++--
11 files changed, 51 insertions(+), 47 deletions(-)
diffs (truncated from 343 to 300 lines):
diff -r 02c22793b283 -r 764cd55b764d sys/net/link_proto.c
--- a/sys/net/link_proto.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/net/link_proto.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: link_proto.c,v 1.24 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: link_proto.c,v 1.24.2.1 2019/01/29 07:56:59 msaitoh Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.24 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.24.2.1 2019/01/29 07:56:59 msaitoh Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -389,6 +389,9 @@
{
KASSERT(solocked(so));
+ m_freem(m);
+ m_freem(control);
+
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netatalk/ddp_usrreq.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ddp_usrreq.c,v 1.63 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: ddp_usrreq.c,v 1.63.2.1 2019/01/29 07:56:59 msaitoh Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.63 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.63.2.1 2019/01/29 07:56:59 msaitoh Exp $");
#include "opt_mbuftrace.h"
@@ -581,8 +581,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netbt/hci_socket.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hci_socket.c,v 1.40 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: hci_socket.c,v 1.40.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.40 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.40.2.1 2019/01/29 07:57:00 msaitoh Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -712,10 +712,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
- if (control)
- m_freem(control);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netbt/l2cap_socket.c
--- a/sys/netbt/l2cap_socket.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netbt/l2cap_socket.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: l2cap_socket.c,v 1.31 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: l2cap_socket.c,v 1.31.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.31 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.31.2.1 2019/01/29 07:57:00 msaitoh Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -349,10 +349,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
- if (control)
- m_freem(control);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netbt/rfcomm_socket.c
--- a/sys/netbt/rfcomm_socket.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netbt/rfcomm_socket.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rfcomm_socket.c,v 1.33 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: rfcomm_socket.c,v 1.33.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.33 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.33.2.1 2019/01/29 07:57:00 msaitoh Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -354,10 +354,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
- if (control)
- m_freem(control);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netbt/sco_socket.c
--- a/sys/netbt/sco_socket.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netbt/sco_socket.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sco_socket.c,v 1.33 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: sco_socket.c,v 1.33.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.33 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.33.2.1 2019/01/29 07:57:00 msaitoh Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -340,10 +340,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
- if (control)
- m_freem(control);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netinet/tcp_usrreq.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.200.2.3 2017/09/11 05:46:43 snj Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.200.2.4 2019/01/29 07:57:00 msaitoh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.200.2.3 2017/09/11 05:46:43 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.200.2.4 2019/01/29 07:57:00 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -1210,14 +1210,18 @@
int error = 0;
int s;
- if ((error = tcp_getpcb(so, &inp, &in6p, &tp)) != 0)
+ if ((error = tcp_getpcb(so, &inp, &in6p, &tp)) != 0) {
+ m_freem(m);
+ m_freem(control);
return error;
+ }
ostate = tcp_debug_capture(tp, PRU_SENDOOB);
s = splsoftnet();
if (sbspace(&so->so_snd) < -512) {
m_freem(m);
+ m_freem(control);
splx(s);
return ENOBUFS;
}
@@ -1236,6 +1240,7 @@
tp->t_force = 0;
tcp_debug_trace(so, tp, ostate, PRU_SENDOOB);
splx(s);
+ m_freem(control);
return error;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netinet6/raw_ip6.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip6.c,v 1.136.2.3 2018/04/01 09:12:42 martin Exp $ */
+/* $NetBSD: raw_ip6.c,v 1.136.2.4 2019/01/29 07:57:00 msaitoh Exp $ */
/* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.136.2.3 2018/04/01 09:12:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.136.2.4 2019/01/29 07:57:00 msaitoh Exp $");
#include "opt_ipsec.h"
@@ -913,8 +913,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netinet6/udp6_usrreq.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udp6_usrreq.c,v 1.115 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: udp6_usrreq.c,v 1.115.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.115 2014/08/09 05:33:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.115.2.1 2019/01/29 07:57:00 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_inet_csum.h"
@@ -875,10 +875,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
- if (control)
- m_freem(control);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 02c22793b283 -r 764cd55b764d sys/netmpls/mpls_proto.c
--- a/sys/netmpls/mpls_proto.c Thu Jan 24 14:14:32 2019 +0000
+++ b/sys/netmpls/mpls_proto.c Tue Jan 29 07:56:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpls_proto.c,v 1.24 2014/08/09 05:33:01 rtr Exp $ */
+/* $NetBSD: mpls_proto.c,v 1.24.2.1 2019/01/29 07:57:00 msaitoh Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
Home |
Main Index |
Thread Index |
Old Index