projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5e4156
)
ipv6: fix missing in6_ifa_put in addrconf
author
John Fastabend
<
[email protected]
>
Mon, 15 Nov 2010 20:29:21 +0000
(20:29 +0000)
committer
David S. Miller
<
[email protected]
>
Tue, 16 Nov 2010 17:24:58 +0000
(09:24 -0800)
Fix ref count bug introduced by
commit
2de795707294972f6c34bae9de713e502c431296
Author: Lorenzo Colitti <
[email protected]
>
Date: Wed Oct 27 18:16:49 2010 +0000
ipv6: addrconf: don't remove address state on ifdown if the address
is being kept
Fix logic so that addrconf_ifdown() decrements the inet6_ifaddr
refcnt correctly with in6_ifa_put().
Reported-by: Stephen Hemminger <
[email protected]
>
Signed-off-by: John Fastabend <
[email protected]
>
Acked-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv6/addrconf.c
patch
|
blob
|
history
diff --git
a/net/ipv6/addrconf.c
b/net/ipv6/addrconf.c
index b41ce0f0d514154597753d549b5a29a3bc7e7ae0..aaa3ca448d08c43592b5fdbefdd8750178ae62d7 100644
(file)
--- a/
net/ipv6/addrconf.c
+++ b/
net/ipv6/addrconf.c
@@
-2754,13
+2754,13
@@
static int addrconf_ifdown(struct net_device *dev, int how)
ifa->state = INET6_IFADDR_STATE_DEAD;
spin_unlock_bh(&ifa->state_lock);
- if (state == INET6_IFADDR_STATE_DEAD) {
- in6_ifa_put(ifa);
- } else {
+ if (state != INET6_IFADDR_STATE_DEAD) {
__ipv6_ifa_notify(RTM_DELADDR, ifa);
atomic_notifier_call_chain(&inet6addr_chain,
NETDEV_DOWN, ifa);
}
+
+ in6_ifa_put(ifa);
write_lock_bh(&idev->lock);
}
}