From: WANG Cong Date: Fri, 5 Sep 2014 21:33:00 +0000 (-0700) Subject: ipv6: restore the behavior of ipv6_sock_ac_drop() X-Git-Tag: v3.17-rc5~41^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=de185ab46cb02df9738b0d898b0c3a89181c5526;p=~emulex%2Finfiniband.git ipv6: restore the behavior of ipv6_sock_ac_drop() 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 Cc: David S. Miller Signed-off-by: Cong Wang Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 45b9d81d91e..ff2de7d9d8e 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; }