Re: [PATCH v3 net] ipv6: move DAD and addrconf_verify processing to workqueue
From: David Miller <davem@davemloft.net>
Date: 2014-03-28 20:57:05
From: Hannes Frederic Sowa <redacted> Date: Thu, 27 Mar 2014 18:28:07 +0100
addrconf_join_solict and addrconf_join_anycast may cause actions which need rtnl locked, especially on first address creation. A new DAD state is introduced which deferres processing of the initial DAD processing into a workqueue. To get rtnl lock we need to push the code paths which depend on those calls up to workqueues, specifically addrconf_verify and the DAD processing. (v2) addrconf_dad_failure needs to be queued up to the workqueue, too. This patch introduces a new DAD state and stop the DAD processing in the workqueue (this is because of the possible ipv6_del_addr processing which removes the solicited multicast address from the device). addrconf_verify_lock is removed, too. After the transition it is not needed any more. As we are not processing in bottom half anymore we need to be a bit more careful about disabling bottom half out when we lock spin_locks which are also used in bh. Relevant backtrace:
...
Hunks and backtrace stolen from a patch by Stephen Hemminger. Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Hannes Frederic Sowa <redacted> --- v3 (only minor change): * reword pr_notice in inet6_ifa_finish_destroy (thanks, David!)
Applied, thanks a lot Hannes.