Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-0]: src/sys Pull up following revision(s) (requested by martin ...
details: https://anonhg.NetBSD.org/src/rev/b427aeaca6cc
branches: netbsd-7-0
changeset: 801546:b427aeaca6cc
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jan 29 08:09:00 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 326391d7f9a4 -r b427aeaca6cc sys/net/link_proto.c
--- a/sys/net/link_proto.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/net/link_proto.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09:00 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.6.1 2019/01/29 08:09:00 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 326391d7f9a4 -r b427aeaca6cc sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netatalk/ddp_usrreq.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09:00 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.6.1 2019/01/29 08:09:00 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 326391d7f9a4 -r b427aeaca6cc sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netbt/hci_socket.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09: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.6.1 2019/01/29 08:09: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 326391d7f9a4 -r b427aeaca6cc sys/netbt/l2cap_socket.c
--- a/sys/netbt/l2cap_socket.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netbt/l2cap_socket.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09: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.6.1 2019/01/29 08:09: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 326391d7f9a4 -r b427aeaca6cc sys/netbt/rfcomm_socket.c
--- a/sys/netbt/rfcomm_socket.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netbt/rfcomm_socket.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09: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.6.1 2019/01/29 08:09: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 326391d7f9a4 -r b427aeaca6cc sys/netbt/sco_socket.c
--- a/sys/netbt/sco_socket.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netbt/sco_socket.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09: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.6.1 2019/01/29 08:09: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 326391d7f9a4 -r b427aeaca6cc sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netinet/tcp_usrreq.c Tue Jan 29 08:09:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.200.2.2 2015/02/21 13:40:19 martin Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.200.2.2.2.1 2019/01/29 08:09: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.2 2015/02/21 13:40:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.200.2.2.2.1 2019/01/29 08:09:00 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -1200,14 +1200,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;
}
@@ -1226,6 +1230,7 @@
tp->t_force = 0;
tcp_debug_trace(so, tp, ostate, PRU_SENDOOB);
splx(s);
+ m_freem(control);
return error;
}
diff -r 326391d7f9a4 -r b427aeaca6cc sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netinet6/raw_ip6.c Tue Jan 29 08:09:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip6.c,v 1.136.6.2 2018/04/01 09:14:45 martin Exp $ */
+/* $NetBSD: raw_ip6.c,v 1.136.6.3 2019/01/29 08:09:01 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.6.2 2018/04/01 09:14:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.136.6.3 2019/01/29 08:09:01 msaitoh Exp $");
#include "opt_ipsec.h"
@@ -914,8 +914,8 @@
{
KASSERT(solocked(so));
- if (m)
- m_freem(m);
+ m_freem(m);
+ m_freem(control);
return EOPNOTSUPP;
}
diff -r 326391d7f9a4 -r b427aeaca6cc sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netinet6/udp6_usrreq.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09:01 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.6.1 2019/01/29 08:09:01 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 326391d7f9a4 -r b427aeaca6cc sys/netmpls/mpls_proto.c
--- a/sys/netmpls/mpls_proto.c Thu Jan 24 14:12:40 2019 +0000
+++ b/sys/netmpls/mpls_proto.c Tue Jan 29 08:09:00 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.6.1 2019/01/29 08:09:01 msaitoh Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
Home |
Main Index |
Thread Index |
Old Index