Skip to content

Commit

Permalink
[IPV6]: Fix dead lock.
Browse files Browse the repository at this point in the history
We need to relesae ifp->lock before we call addrconf_dad_stop(),
which will hold ifp->lock.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Dec 23, 2005
1 parent c162eea commit 3dd3bf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,9 +2467,11 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
return;
}

if (idev->if_flags & IF_READY)
if (idev->if_flags & IF_READY) {
addrconf_dad_kick(ifp);
else {
spin_unlock_bh(&ifp->lock);
} else {
spin_unlock_bh(&ifp->lock);
/*
* If the defice is not ready:
* - keep it tentative if it is a permanent address.
Expand All @@ -2478,8 +2480,6 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
in6_ifa_hold(ifp);
addrconf_dad_stop(ifp);
}

spin_unlock_bh(&ifp->lock);
out:
read_unlock_bh(&idev->lock);
}
Expand Down

0 comments on commit 3dd3bf8

Please sign in to comment.