From bd2ac9a794cd124594fc92d247ba8851a23de1b4 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Thu, 21 Jan 2021 17:55:35 -0800 Subject: [PATCH] zebra: drop the SVI MAC cleanup done as a part of interface delete As a part of FRR shutdown interfaces are force flushed (in an arbitary order). Interfaces are already down at that point i.e. resources like SVI-MAC have already been released. Attempting to clean it up again as a part of the force-flush was resulting in access of freed up memory - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ==26457== Thread 1: ==26457== Invalid read of size 8 ==26457== at 0x1AE6B0: zebra_evpn_acc_bd_svi_set (zebra_evpn_mh.c:606) ==26457== by 0x1B1460: zebra_evpn_if_cleanup (zebra_evpn_mh.c:1040) ==26457== by 0x13CA69: if_zebra_delete_hook (interface.c:244) ==26457== by 0x48A0E34: hook_call_if_del (if.c:59) ==26457== by 0x48A0E34: if_delete_retain (if.c:290) ==26457== by 0x48A2F94: if_delete (if.c:313) ==26457== by 0x48A3169: if_terminate (if.c:1217) ==26457== by 0x48E0024: vrf_delete (vrf.c:254) ==26457== by 0x48E0024: vrf_delete (vrf.c:225) ==26457== by 0x48E02FE: vrf_terminate (vrf.c:551) ==26457== by 0x1442E1: sigint (main.c:203) ==26457== by 0x1442E1: sigint (main.c:141) ==26457== by 0x48CF862: quagga_sigevent_process (sigevent.c:103) ==26457== by 0x48DD324: thread_fetch (thread.c:1404) ==26457== by 0x48A926A: frr_run (libfrr.c:1122) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (gdb) bt (gdb) fr 5 1037 zebra/zebra_evpn_mh.c: No such file or directory. (gdb) p zif->ifp->name $2 = "vlan131", '\000' (gdb) p zif->link->info $5 = (void *) 0x1 (gdb) p/x zif->ifp->flags $7 = 0x1002 (gdb) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Ticket: CM-32435 Signed-off-by: Anuradha Karuppiah --- zebra/zebra_evpn_mh.c | 1 - 1 file changed, 1 deletion(-) diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 0534e130b1..bb109e9921 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -1039,7 +1039,6 @@ void zebra_evpn_if_cleanup(struct zebra_if *zif) vlanid_t vid; struct zebra_evpn_es *es; - zebra_evpn_acc_bd_svi_set(zif, NULL, false); if (!bf_is_inited(zif->vlan_bitmap)) return; -- 2.39.5