]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: clean up anycast when an interface is destroyed
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 10 Sep 2014 21:23:02 +0000 (23:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Sep 2014 21:33:06 +0000 (17:33 -0400)
commit9d2b43ec6e051b1cd06e5be3b679e1244d6bae06
treeb6f2de835f42420ad2d374c8ec91da74de2ba988
parent3000fd40eca6d299320b7f2b708ba7e0d73e4d3f
ipv6: clean up anycast when an interface is destroyed

If we try to rmmod the driver for an interface while sockets with
setsockopt(JOIN_ANYCAST) are alive, some refcounts aren't cleaned up
and we get stuck on:

  unregister_netdevice: waiting for ens3 to become free. Usage count = 1

If we LEAVE_ANYCAST/close everything before rmmod'ing, there is no
problem.

We need to perform a cleanup similar to the one for multicast in
addrconf_ifdown(how == 1).

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/addrconf.h
net/ipv6/addrconf.c
net/ipv6/anycast.c