Skip to content

Commit 8ae72cb

Browse files
dsaherndavem330
authored andcommitted
Revert "ipv6: Handle race in addrconf_dad_work"
This reverts commit a3ce2a2. Eric reported tests failings with commit. After digging into it, the bottom line is that the DAD sequence is not to be messed with. There are too many cases that are expected to proceed regardless of whether a device is up. Revert the patch and I will send a different solution for the problem Rajendra reported. Signed-off-by: David Ahern <[email protected]> Cc: Eric Dumazet <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7a512eb commit 8ae72cb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

net/ipv6/addrconf.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4032,12 +4032,6 @@ static void addrconf_dad_work(struct work_struct *w)
40324032

40334033
rtnl_lock();
40344034

4035-
/* check if device was taken down before this delayed work
4036-
* function could be canceled
4037-
*/
4038-
if (idev->dead || !(idev->if_flags & IF_READY))
4039-
goto out;
4040-
40414035
spin_lock_bh(&ifp->lock);
40424036
if (ifp->state == INET6_IFADDR_STATE_PREDAD) {
40434037
action = DAD_BEGIN;
@@ -4083,6 +4077,11 @@ static void addrconf_dad_work(struct work_struct *w)
40834077
goto out;
40844078

40854079
write_lock_bh(&idev->lock);
4080+
if (idev->dead || !(idev->if_flags & IF_READY)) {
4081+
write_unlock_bh(&idev->lock);
4082+
goto out;
4083+
}
4084+
40864085
spin_lock(&ifp->lock);
40874086
if (ifp->state == INET6_IFADDR_STATE_DEAD) {
40884087
spin_unlock(&ifp->lock);

0 commit comments

Comments
 (0)