[Bug 227720] Kernel panic in ppp server

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 30 10:06:43 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227720

--- Comment #45 from Franck Rousseau <Franck.Rousseau at imag.fr> ---
(In reply to Andrey V. Elsukov from comment #44)

[/usr/src]# svnlite info
Path: .
Working Copy Root Path: /usr/src
URL: https://svn.freebsd.org/base/releng/11.2
Relative URL: ^/releng/11.2
Repository Root: https://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 341162
Node Kind: directory
Schedule: normal
Last Changed Author: gordon
Last Changed Rev: 341093
Last Changed Date: 2018-11-27 20:45:25 +0100 (Tue, 27 Nov 2018)

[/usr/src]# svnlite diff
Index: sys/amd64/conf/GENERIC
===================================================================
--- sys/amd64/conf/GENERIC      (revision 341162)
+++ sys/amd64/conf/GENERIC      (working copy)
@@ -82,6 +82,8 @@
 # Debugging support.  Always need this:
 options        KDB                     # Enable kernel debugger support.
 options        KDB_TRACE               # Print a stack trace for a panic.
+options         DDB                     # Support DDB.
+options         GDB                     # Support remote GDB.

 # Make an SMP-capable kernel by default
 options        SMP                     # Symmetric MultiProcessor Kernel
Index: sys/net/if.c
===================================================================
--- sys/net/if.c        (revision 341162)
+++ sys/net/if.c        (working copy)
@@ -1032,6 +1032,8 @@
                if (iter == ifp) {
                        TAILQ_REMOVE(&V_ifnet, ifp, if_link);
                        found = 1;
+                       if (!vmove)
+                               ifp->if_flags |= IFF_DYING;
                        break;
                }
        IFNET_WUNLOCK();
Index: sys/net/rtsock.c
===================================================================
--- sys/net/rtsock.c    (revision 341162)
+++ sys/net/rtsock.c    (working copy)
@@ -1555,7 +1555,7 @@
        info.rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt),
            rt_mask(rt), &ss);
        info.rti_info[RTAX_GENMASK] = 0;
-       if (rt->rt_ifp) {
+       if (rt->rt_ifp && !(rt->rt_ifp->if_flags & IFF_DYING)) {
                info.rti_info[RTAX_IFP] = rt->rt_ifp->if_addr->ifa_addr;
                info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
                if (rt->rt_ifp->if_flags & IFF_POINTOPOINT)
@@ -1913,8 +1913,10 @@
                        rnh = rt_tables_get_rnh(fib, i);
                        if (rnh != NULL) {
                                RIB_RLOCK(rnh); 
+                               IFNET_RLOCK_NOSLEEP();
                                error = rnh->rnh_walktree(&rnh->head,
                                    sysctl_dumpentry, &w);
+                               IFNET_RUNLOCK_NOSLEEP();
                                RIB_RUNLOCK(rnh);
                        } else if (af != 0)
                                error = EAFNOSUPPORT;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list