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)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 26 Jan 2015 21:19:52 +0000 (13:19 -0800)
commit86a47ad60de5221c3869821d3552dcd1c89199f5
tree4da3e18810d3ccd2eb631becc97e46d6821ecb99
parent41ba06281471b7ade8782204079f92633caf7285
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).

BUG: 18902601
Change-Id: I6d51aed5755eb5738fcba91950e7773a1c985d2e
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