Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys Pull up following revision(s) (requested by martin in...



details:   https://anonhg.NetBSD.org/src/rev/50cd3c37fbf6
branches:  netbsd-8
changeset: 852239:50cd3c37fbf6
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jan 29 07:04:09 2019 +0000

description:
Pull up following revision(s) (requested by martin in ticket #1175):
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/sctp_usrreq.c                       1.14
sys/netinet/tcp_usrreq.c                        1.223
sys/netinet6/raw_ip6.c                          1.173
sys/netinet6/sctp6_usrreq.c                     1.17
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/sctp_usrreq.c   |  10 ++++------
 sys/netinet/tcp_usrreq.c    |  11 ++++++++---
 sys/netinet6/raw_ip6.c      |   8 ++++----
 sys/netinet6/sctp6_usrreq.c |  10 ++++------
 sys/netinet6/udp6_usrreq.c  |  10 ++++------
 sys/netmpls/mpls_proto.c    |   7 +++++--
 sys/netnatm/natm.c          |   7 +++++--
 13 files changed, 59 insertions(+), 59 deletions(-)

diffs (truncated from 407 to 300 lines):

diff -r f625987a8229 -r 50cd3c37fbf6 sys/net/link_proto.c
--- a/sys/net/link_proto.c      Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/net/link_proto.c      Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: link_proto.c,v 1.36 2017/04/06 03:55:00 ozaki-r Exp $  */
+/*     $NetBSD: link_proto.c,v 1.36.6.1 2019/01/29 07:04:09 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.36 2017/04/06 03:55:00 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.36.6.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -401,6 +401,9 @@
 {
        KASSERT(solocked(so));
 
+       m_freem(m);
+       m_freem(control);
+
        return EOPNOTSUPP;
 }
 
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netatalk/ddp_usrreq.c Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ddp_usrreq.c,v 1.70 2016/12/08 05:16:33 ozaki-r Exp $   */
+/*     $NetBSD: ddp_usrreq.c,v 1.70.8.1 2019/01/29 07:04:09 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.70 2016/12/08 05:16:33 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.70.8.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 #include "opt_mbuftrace.h"
 
@@ -518,8 +518,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c    Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netbt/hci_socket.c    Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hci_socket.c,v 1.45 2015/12/22 11:40:07 plunky Exp $   */
+/*     $NetBSD: hci_socket.c,v 1.45.10.1 2019/01/29 07:04:09 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.45 2015/12/22 11:40:07 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.45.10.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -690,10 +690,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
-       if (control)
-               m_freem(control);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netbt/l2cap_socket.c
--- a/sys/netbt/l2cap_socket.c  Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netbt/l2cap_socket.c  Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: l2cap_socket.c,v 1.35 2015/05/02 17:18:03 rtr Exp $    */
+/*     $NetBSD: l2cap_socket.c,v 1.35.10.1 2019/01/29 07:04:09 msaitoh Exp $   */
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.35 2015/05/02 17:18:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.35.10.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -338,10 +338,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
-       if (control)
-               m_freem(control);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netbt/rfcomm_socket.c
--- a/sys/netbt/rfcomm_socket.c Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netbt/rfcomm_socket.c Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rfcomm_socket.c,v 1.37 2015/05/02 17:18:03 rtr Exp $   */
+/*     $NetBSD: rfcomm_socket.c,v 1.37.10.1 2019/01/29 07:04:09 msaitoh Exp $  */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.37 2015/05/02 17:18:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.37.10.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -343,10 +343,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
-       if (control)
-               m_freem(control);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netbt/sco_socket.c
--- a/sys/netbt/sco_socket.c    Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netbt/sco_socket.c    Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sco_socket.c,v 1.37 2015/05/02 17:18:03 rtr Exp $      */
+/*     $NetBSD: sco_socket.c,v 1.37.10.1 2019/01/29 07:04:09 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.37 2015/05/02 17:18:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.37.10.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -329,10 +329,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
-       if (control)
-               m_freem(control);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netinet/sctp_usrreq.c
--- a/sys/netinet/sctp_usrreq.c Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netinet/sctp_usrreq.c Tue Jan 29 07:04:09 2019 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: sctp_usrreq.c,v 1.50 2005/06/16 20:45:29 jinmei Exp $    */
-/*     $NetBSD: sctp_usrreq.c,v 1.6 2016/07/07 09:32:02 ozaki-r Exp $  */
+/*     $NetBSD: sctp_usrreq.c,v 1.6.10.1 2019/01/29 07:04:09 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.6 2016/07/07 09:32:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.6.10.1 2019/01/29 07:04:09 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3814,10 +3814,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
-       if (control)
-               m_freem(control);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netinet/tcp_usrreq.c  Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.214.6.1 2017/08/25 05:36:16 snj Exp $ */
+/*     $NetBSD: tcp_usrreq.c,v 1.214.6.2 2019/01/29 07:04:09 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.214.6.1 2017/08/25 05:36:16 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.214.6.2 2019/01/29 07:04:09 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1182,14 +1182,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;
        }
@@ -1208,6 +1212,7 @@
        tp->t_force = 0;
        tcp_debug_trace(so, tp, ostate, PRU_SENDOOB);
        splx(s);
+       m_freem(control);
 
        return error;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c    Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netinet6/raw_ip6.c    Tue Jan 29 07:04:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_ip6.c,v 1.157.2.4 2018/04/09 13:34:10 bouyer Exp $ */
+/*     $NetBSD: raw_ip6.c,v 1.157.2.5 2019/01/29 07:04:09 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.157.2.4 2018/04/09 13:34:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.157.2.5 2019/01/29 07:04:09 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -924,8 +924,8 @@
 {
        KASSERT(solocked(so));
 
-       if (m)
-               m_freem(m);
+       m_freem(m);
+       m_freem(control);
 
        return EOPNOTSUPP;
 }
diff -r f625987a8229 -r 50cd3c37fbf6 sys/netinet6/sctp6_usrreq.c
--- a/sys/netinet6/sctp6_usrreq.c       Mon Jan 28 13:03:57 2019 +0000
+++ b/sys/netinet6/sctp6_usrreq.c       Tue Jan 29 07:04:09 2019 +0000
@@ -1,5 +1,5 @@
 /* $KAME: sctp6_usrreq.c,v 1.38 2005/08/24 08:08:56 suz Exp $ */
-/* $NetBSD: sctp6_usrreq.c,v 1.13 2017/04/20 09:19:19 ozaki-r Exp $ */
+/* $NetBSD: sctp6_usrreq.c,v 1.13.4.1 2019/01/29 07:04:09 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.



Home | Main Index | Thread Index | Old Index