IPv6, mcast: deactivate timers before ipv6_mc_destroy_dev()
Subsystems (3)
PATCH 1/1 IPv6, mcast: deactivate timers before ipv6_mc_destroy_dev()
Hello,
the following patch calls ipv6_mc_down(idev) to deactivate timers. If we do not deactivate them, the following may happen:
1) remove last IPv6 address from the interface
- mld_ifc_timer may be active, thus referencing idev
- addrconf_ifdown() is called (which calls ipv6_mc_destroy_dev()), removing all references to idev except the timer reference
- timer expires, mld_ifc_timer_expire() is called, reference to idev is removed, but not tested (__in6_dev_put())
- idev is not removed and it is referencing dev
2) destroy interface
- idev's reference to dev never disappears
net/ipv6/mcast.c renamed from net/ipv6/mcast.c.orig +3 -0
@@ -2029,6 +2029,9 @@struct ifmcaddr6 *i;struct in6_addr maddr; +/* Deactivate timers */ +ipv6_mc_down (idev); +/* Delete all-nodes address. */ ipv6_addr_all_nodes (&maddr);
Best Regards,
Signature · 3 lines
Jan Oravec 6COM s.r.o. http://www.6com.sk
David S. Miller
AppliedQuoted 2 lines · On Sun, 5 Oct 2003 11:06:10 +0200 Jan Oravec <[email protected]> wrote:
the following patch calls
ipv6_mc_down(idev)to deactivate timers. If we do not deactivate them, the following may happen:
Applied, thanks a lot Jan.