summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-09-05 14:33:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-15 08:36:41 +0200
commitd7c5b263df9a794934589b372120e8043707f82e (patch)
tree857df022ce237c89483ac91bbd3b4104236f3b81 /net/ipv6
parent9ede8fd5c6a7530d99ce93416f47e72872b052d2 (diff)
downloadkernel-common-d7c5b263df9a794934589b372120e8043707f82e.tar.gz
kernel-common-d7c5b263df9a794934589b372120e8043707f82e.tar.bz2
kernel-common-d7c5b263df9a794934589b372120e8043707f82e.zip
ipv6: restore the behavior of ipv6_sock_ac_drop()
[ Upstream commit de185ab46cb02df9738b0d898b0c3a89181c5526 ] It is possible that the interface is already gone after joining the list of anycast on this interface as we don't hold a refcount for the device, in this case we are safe to ignore the error. What's more important, for API compatibility we should not change this behavior for applications even if it were correct. Fixes: commit a9ed4a2986e13011 ("ipv6: fix rtnl locking in setsockopt for anycast and multicast") Cc: Sabrina Dubroca <sd@queasysnail.net> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/anycast.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 45b9d81d91e8..ff2de7d9d8e6 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -182,8 +182,6 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
rtnl_unlock();
sock_kfree_s(sk, pac, sizeof(*pac));
- if (!dev)
- return -ENODEV;
return 0;
}