Skip to content

Instantly share code, notes, and snippets.

@HomerSp
Created December 18, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HomerSp/32fe746e6409347e8cb88b9e5d9a5e05 to your computer and use it in GitHub Desktop.
Save HomerSp/32fe746e6409347e8cb88b9e5d9a5e05 to your computer and use it in GitHub Desktop.
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4891743..7336a73 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3378,11 +3378,7 @@ static int ip6_route_dev_notify(struct notifier_block *this,
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
- } else if (event == NETDEV_UNREGISTER &&
- dev->reg_state != NETREG_UNREGISTERED) {
- /* NETDEV_UNREGISTER could be fired for multiple times by
- * netdev_wait_allrefs(). Make sure we only call this once.
- */
+ } else if (event == NETDEV_UNREGISTER) {
in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment