Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Change SPL around call to in_pcbbind().



details:   https://anonhg.NetBSD.org/src/rev/fda94229574f
branches:  trunk
changeset: 353462:fda94229574f
user:      rjs <rjs%NetBSD.org@localhost>
date:      Sun May 07 21:24:37 2017 +0000

description:
Change SPL around call to in_pcbbind().

diffstat:

 sys/netinet/dccp_usrreq.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r c23bdde5dcae -r fda94229574f sys/netinet/dccp_usrreq.c
--- a/sys/netinet/dccp_usrreq.c Sun May 07 20:08:02 2017 +0000
+++ b/sys/netinet/dccp_usrreq.c Sun May 07 21:24:37 2017 +0000
@@ -1,5 +1,5 @@
 /*     $KAME: dccp_usrreq.c,v 1.67 2005/11/03 16:05:04 nishida Exp $   */
-/*     $NetBSD: dccp_usrreq.c,v 1.14 2017/05/07 20:08:02 rjs Exp $ */
+/*     $NetBSD: dccp_usrreq.c,v 1.15 2017/05/07 21:24:37 rjs Exp $ */
 
 /*
  * Copyright (c) 2003 Joacim Häggmark, Magnus Erixzon, Nils-Erik Mattsson 
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.14 2017/05/07 20:08:02 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dccp_usrreq.c,v 1.15 2017/05/07 21:24:37 rjs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1815,6 +1815,7 @@
 {
        struct inpcb *inp;
        int error;
+       int s;
        struct sockaddr_in *sin = (struct sockaddr_in *)nam;
 
        DCCP_DEBUG((LOG_INFO, "Entering dccp_bind!\n"));
@@ -1832,7 +1833,9 @@
                return EAFNOSUPPORT;
        }
        INP_LOCK(inp);
+       s = splsoftnet();
        error = in_pcbbind(inp, sin, l);
+       splx(s);
        INP_UNLOCK(inp);
        INP_INFO_WUNLOCK(&dccpbinfo);
        return error;



Home | Main Index | Thread Index | Old Index