Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/ccabdd1bc655
branches:  netbsd-8
changeset: 434378:ccabdd1bc655
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Nov 06 09:59:01 2017 +0000

description:
Pull up following revision(s) (requested by knakahara in ticket #341):
        sys/net/if_l2tp.c: revision 1.12
fix l2tp panic when l2tp session id is changed (same as if_vlan.c:r1.104)
E.g. the following operation causes this panic.
    ====================
    # ifconfig l2tp0 create
    # ifconfig l2tp0 session 140 140
    # ifconfig l2tp1 create
    # ifconfig l2tp1 session 200 200
    # ifconfig l2tp1 session 300 300
    panic: kernel diagnostic assertion "new->ple_next == NULL" failed: file "/disk4/home/k-nakahara/repos/netbsd-src/sys/sys/pslist.h", line 118
    ====================
Pointed out by s-yamaguchi@IIJ, thanks.

diffstat:

 sys/net/if_l2tp.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r a8329656fbb4 -r ccabdd1bc655 sys/net/if_l2tp.c
--- a/sys/net/if_l2tp.c Mon Nov 06 09:57:39 2017 +0000
+++ b/sys/net/if_l2tp.c Mon Nov 06 09:59:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_l2tp.c,v 1.11 2017/06/01 02:45:14 chs Exp $ */
+/*     $NetBSD: if_l2tp.c,v 1.11.2.1 2017/11/06 09:59:01 snj Exp $     */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.11 2017/06/01 02:45:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.11.2.1 2017/11/06 09:59:01 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1069,6 +1069,7 @@
                pserialize_perform(l2tp_psz);
        }
        mutex_exit(&l2tp_hash.lock);
+       PSLIST_ENTRY_DESTROY(sc, l2tp_hash);
 
        l2tp_variant_update(sc, nvar);
        mutex_exit(&sc->l2tp_lock);
@@ -1078,6 +1079,7 @@
                log(LOG_DEBUG, "%s: add hash entry: sess_id=%" PRIu32 ", idx=%" PRIu32 "\n",
                    sc->l2tp_ec.ec_if.if_xname, nvar->lv_my_sess_id, idx);
 
+       PSLIST_ENTRY_INIT(sc, l2tp_hash);
        mutex_enter(&l2tp_hash.lock);
        PSLIST_WRITER_INSERT_HEAD(&l2tp_hash.lists[idx], sc, l2tp_hash);
        mutex_exit(&l2tp_hash.lock);



Home | Main Index | Thread Index | Old Index