[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18b0fdf4-f967-9a04-91d6-597848f073a9@gmail.com>
Date: Tue, 20 Jun 2017 23:16:29 -0400
From: David Ahern <dsahern@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>, netdev@...r.kernel.org
Cc: jeffy.chen@...k-chips.com
Subject: Re: [Patch net] ipv6: only call ip6_route_dev_notify() once for
NETDEV_UNREGISTER
On 6/20/17 2:42 PM, Cong Wang wrote:
> In commit 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf")
> I assumed NETDEV_REGISTER and NETDEV_UNREGISTER are paired,
> unfortunately, as reported by jeffy, netdev_wait_allrefs()
> could rebroadcast NETDEV_UNREGISTER event until all refs are
> gone.
>
> We have to add an additional check to avoid this corner case.
> For netdev_wait_allrefs() dev->reg_state is NETREG_UNREGISTERED,
> for dev_change_net_namespace(), dev->reg_state is
> NETREG_REGISTERED. So check for dev->reg_state != NETREG_UNREGISTERED.
>
> Fixes: 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf")
> Reported-by: jeffy <jeffy.chen@...k-chips.com>
> Cc: David Ahern <dsahern@...il.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
> net/ipv6/route.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Acked-by: David Ahern <dsahern@...il.com>
Powered by blists - more mailing lists