mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[IPV6]: Fix addrconf dead lock.
We need to release idev->lcok before we call addrconf_dad_stop(). It calls ipv6_addr_del(), which will hold idev->lock. Bug spotted by Yasuyuki KOZAKAI <[email protected]>. Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
79cac2a221
commit
6732badee0
1 changed files with 5 additions and 4 deletions
|
|
@ -2467,11 +2467,9 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
|
|||
return;
|
||||
}
|
||||
|
||||
if (idev->if_flags & IF_READY) {
|
||||
addrconf_dad_kick(ifp);
|
||||
spin_unlock_bh(&ifp->lock);
|
||||
} else {
|
||||
if (!(idev->if_flags & IF_READY)) {
|
||||
spin_unlock_bh(&ifp->lock);
|
||||
read_unlock_bh(&idev->lock);
|
||||
/*
|
||||
* If the defice is not ready:
|
||||
* - keep it tentative if it is a permanent address.
|
||||
|
|
@ -2479,7 +2477,10 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
|
|||
*/
|
||||
in6_ifa_hold(ifp);
|
||||
addrconf_dad_stop(ifp);
|
||||
return;
|
||||
}
|
||||
addrconf_dad_kick(ifp);
|
||||
spin_unlock_bh(&ifp->lock);
|
||||
out:
|
||||
read_unlock_bh(&idev->lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue