On Thu, Apr 19, 2018 at 10:46 PM, Jiri Pirko <jiri(a)resnulli.us> wrote:
Fri, Apr 13, 2018 at 08:43:34AM CEST, lucien.xin(a)gmail.com wrote:
>When a dev is being unregistered and the corresp team port is being
>removed, the ifinfo should be delayed to destroy when doing dellink
>next time, because later on the dbg log still needs it to print the
>ifname saved in this ifinfo:
> -1450: veth1: down 0Mbit HD <--
>The smilar process is also used on the team_port's destruction.
>However, after Commit 046fb6ba0aec ("libteam: resynchronize ifinfo
>after lost RTNLGRP_LINK notifications"), it would destroy all those
>ifinfo with REMVOED flag, including the one of current unregistered
>dev enslaved into team. It would cause a crash later when trying to
>print the dbg log.
>A simple way to reproduce:
> # ip link add veth1 type veth peer name veth1_peer
> # sleep 5 && ip link del veth1 &
> # teamd -g -c
>This patch is to avoid it by simply checking !ifinfo->port before
>calling ifinfo_destroy in ifinfo_destroy_removed(), as well as in
>ifinfo_clear_changed(), so that the ifinfo of current unregistered
>dev enslaved into team will be delayed to destroy next time.
What is "next time"?
next time when ifinfo_destroy_removed is called for
Please take case of the typos like:
Also, please be imparative in the patch description like you would be
telling the codebase what to do.
Copy, 'be imparative', will improve the
changelog and post v2.