Source-Changes-HG archive

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

[src/trunk]: src/sys/net kpreempt_disable() before sppp_get_{ip,ip6}_addrs() ...



details:   https://anonhg.NetBSD.org/src/rev/59f8445fdb73
branches:  trunk
changeset: 1024473:59f8445fdb73
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Oct 25 02:10:56 2021 +0000

description:
kpreempt_disable() before sppp_get_{ip,ip6}_addrs() are unnecessary now.

diffstat:

 sys/net/if_spppsubr.c |  14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diffs (68 lines):

diff -r 7e2f10e6e86b -r 59f8445fdb73 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Mon Oct 25 02:06:29 2021 +0000
+++ b/sys/net/if_spppsubr.c     Mon Oct 25 02:10:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.260 2021/10/25 02:06:29 knakahara Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.261 2021/10/25 02:10:56 knakahara Exp $       */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.260 2021/10/25 02:06:29 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.261 2021/10/25 02:10:56 knakahara Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3413,9 +3413,7 @@
        memset(&sp->dns_addrs, 0, sizeof sp->dns_addrs);
 
 #ifdef INET
-       kpreempt_disable();
        sppp_get_ip_addrs(sp, &myaddr, &hisaddr, 0);
-       kpreempt_enable();
 #else
        myaddr = hisaddr = 0;
 #endif
@@ -3967,9 +3965,7 @@
                if (sp->ipcp.flags & IPCP_MYADDR_SEEN) {
                        ouraddr = sp->ipcp.req_myaddr;  /* not sure if this can ever happen */
                } else {
-                       kpreempt_disable();
                        sppp_get_ip_addrs(sp, &ouraddr, 0, 0);
-                       kpreempt_enable();
                }
                opt[i++] = IPCP_OPT_ADDRESS;
                opt[i++] = 6;
@@ -4039,9 +4035,7 @@
        sp->ipv6cp.flags &= ~IPV6CP_MYIFID_SEEN;
 #endif
 
-       kpreempt_disable();
        sppp_get_ip6_addrs(sp, &myaddr, &hisaddr, 0);
-       kpreempt_enable();
        /*
         * If we don't have our address, this probably means our
         * interface doesn't want to talk IPv6 at all.  (This could
@@ -4508,9 +4502,7 @@
        KASSERT(SPPP_WLOCKED(sp));
 
        if (ISSET(sp->ipv6cp.opts, SPPP_IPV6CP_OPT_IFID)) {
-               kpreempt_disable();
                sppp_get_ip6_addrs(sp, &ouraddr, 0, 0);
-               kpreempt_enable();
 
                opt[i++] = IPV6CP_OPT_IFID;
                opt[i++] = 10;
@@ -6268,9 +6260,7 @@
                status->state = sp->scp[IDX_IPCP].state;
                status->opts = sp->ipcp.opts;
 #ifdef INET
-               kpreempt_disable();
                sppp_get_ip_addrs(sp, &myaddr, 0, 0);
-               kpreempt_enable();
 #else
                myaddr = 0;
 #endif



Home | Main Index | Thread Index | Old Index