From: David Ahern Date: Fri, 10 Mar 2017 17:46:15 +0000 (-0800) Subject: mpls: Send route delete notifications when router module is unloaded X-Git-Tag: v4.9.17~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b61206e253020adbfde31f662ec7b5ea8b54935f;p=platform%2Fkernel%2Flinux-amlogic.git mpls: Send route delete notifications when router module is unloaded [ Upstream commit e37791ec1ad785b59022ae211f63a16189bacebf ] When the mpls_router module is unloaded, mpls routes are deleted but notifications are not sent to userspace leaving userspace caches out of sync. Add the call to mpls_notify_route in mpls_net_exit as routes are freed. Fixes: 0189197f44160 ("mpls: Basic routing support") Signed-off-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 5b77377..2a21ff1 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1696,6 +1696,7 @@ static void mpls_net_exit(struct net *net) for (index = 0; index < platform_labels; index++) { struct mpls_route *rt = rtnl_dereference(platform_label[index]); RCU_INIT_POINTER(platform_label[index], NULL); + mpls_notify_route(net, index, rt, NULL, NULL); mpls_rt_free(rt); } rtnl_unlock();