IPv6: fix race between cleanup and add/delete address
authorstephen hemminger <shemminger@vyatta.com>
Wed, 3 Mar 2010 08:19:59 +0000 (08:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Mar 2010 08:39:34 +0000 (00:39 -0800)
commit8f37ada5b5f6bfb4d251a7f510f249cb855b77b3
tree8f39575febf0319570798117f8738f5127084634
parent84e8b803f1e16f3a2b8b80f80a63fa2f2f8a9be6
IPv6: fix race between cleanup and add/delete address

This solves a potential race problem during the cleanup process.
The issue is that addrconf_ifdown() needs to traverse address list,
but then drop lock to call the notifier. The version in -next
could get confused if add/delete happened during this window.
Original code (2.6.32 and earlier) was okay because all addresses
were always deleted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c