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 knaha...



details:   https://anonhg.NetBSD.org/src/rev/a8329656fbb4
branches:  netbsd-8
changeset: 434377:a8329656fbb4
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Nov 06 09:57:39 2017 +0000

description:
Pull up following revision(s) (requested by knahakara in ticket #340):
        sys/net/if_vlan.c: revision 1.104
fix vlan panic when vlan is re-configured without destroy.
E.g. the following operation causes this panic.
    ====================
    # ifconfig vlan0 create
    # ifconfig vlan0 vlan 1 vlanif ixg3
    # ifconfig vlan1 create
    # ifconfig vlan1 vlan 1 vlanif ixg2
    # ifconfig vlan1 -vlanif
    # ifconfig vlan1 vlan 1 vlanif ixg2
    panic: kernel diagnostic assertion "new->ple_next == NULL" failed: file "/git/netbsd-src/sys/sys/pslist.h", line 118
    ====================
Pointed out and tested by msaitoh@n.o, fixed by s-yamaguchi@IIJ, thanks.

diffstat:

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

diffs (34 lines):

diff -r 1a9a2755ca4d -r a8329656fbb4 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Mon Nov 06 09:55:56 2017 +0000
+++ b/sys/net/if_vlan.c Mon Nov 06 09:57:39 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.97.2.4 2017/10/25 07:12:33 snj Exp $     */
+/*     $NetBSD: if_vlan.c,v 1.97.2.5 2017/11/06 09:57:39 snj Exp $     */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.4 2017/10/25 07:12:33 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.5 2017/11/06 09:57:39 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -468,6 +468,7 @@
         */
        ifv->ifv_if.if_type = p->if_type;
 
+       PSLIST_ENTRY_INIT(ifv, ifv_hash);
        idx = tag_hash_func(tag, ifv_hash.mask);
 
        mutex_enter(&ifv_hash.lock);
@@ -572,6 +573,7 @@
        PSLIST_WRITER_REMOVE(ifv, ifv_hash);
        pserialize_perform(vlan_psz);
        mutex_exit(&ifv_hash.lock);
+       PSLIST_ENTRY_DESTROY(ifv, ifv_hash);
 
        vlan_linkmib_update(ifv, nmib);
 



Home | Main Index | Thread Index | Old Index