linux-stable/net/ipv6
Andrey Ryabinin 5a7fbabb10 ipv6/addrlabel: fix ip6addrlbl_get()
commit e459dfeeb6 upstream.

ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded,
ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed,
ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer.

Fix this by inverting ip6addrlbl_hold() check.

Fixes: 2a8cc6c890 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.")
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Cong Wang <cwang@twopensource.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 39b214ba1a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-01-29 22:12:57 +01:00
..
netfilter netfilter: IPv6: initialize TOS field in REJECT target module 2011-06-23 15:24:09 -07:00
addrconf_core.c [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses. 2007-07-31 02:28:21 -07:00
addrconf.c ipv6: addrconf: validate new MTU before applying it 2015-12-06 00:49:02 +01:00
addrlabel.c ipv6/addrlabel: fix ip6addrlbl_get() 2016-01-29 22:12:57 +01:00
af_inet6.c net: add validation for the socket syscall protocol argument 2016-01-29 22:12:42 +01:00
ah6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
anycast.c net: replace %#p6 format specifier with %pi6 2008-10-29 12:50:24 -07:00
datagram.c ipv6: fix leaking uninitialized port number of offender sockaddr 2014-05-19 07:54:02 +02:00
esp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
exthdrs_core.c [NET] IPV6: Fix whitespace errors. 2007-02-10 23:19:42 -08:00
exthdrs.c ipv6: skb_dst() can be NULL in ipv6_hop_jumbo(). 2010-01-18 10:19:52 -08:00
fib6_rules.c net: Remove unused parameter from fill method in fib_rules_ops. 2009-05-20 17:26:23 -07:00
icmp.c ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO 2014-05-19 07:53:55 +02:00
inet6_connection_sock.c ipv6: tcp: fix panic in SYN processing 2014-05-19 07:53:30 +02:00
inet6_hashtables.c net: do not call sock_put() on TIMEWAIT sockets 2014-05-19 07:53:32 +02:00
ip6_fib.c ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not match 2014-05-19 07:53:53 +02:00
ip6_flowlabel.c ipv6: Disallow rediculious flowlabel option sizes. 2009-02-06 00:49:55 -08:00
ip6_input.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ip6_output.c udp: only allow UFO for packets from SOCK_DGRAM sockets 2015-05-24 10:10:47 +02:00
ip6_tunnel.c Fix broken backport for IPv6 tunnels 2011-11-07 12:31:50 -08:00
ip6mr.c ip6mr: call del_timer_sync() in ip6mr_free_table() 2016-01-29 22:12:37 +01:00
ipcomp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ipv6_sockglue.c net: Fix IP_MULTICAST_IF 2009-10-19 21:34:20 -07:00
Kconfig trivial: Kconfig: .ko is normally not included in module names 2009-06-12 18:01:50 +02:00
Makefile [IPV6] MROUTE: Support multicast forwarding. 2008-04-05 22:33:38 +09:00
mcast.c ipv6 mcast: use in6_dev_put in timer handlers instead of __in6_dev_put 2014-05-19 07:53:38 +02:00
mip6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ndisc.c ipv6: Don't reduce hop limit for an interface 2015-05-24 10:10:44 +02:00
netfilter.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
proc.c net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
protocol.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
raw.c Revert "net: add length argument to skb_copy_and_csum_datagram_iovec" 2016-01-29 22:12:40 +01:00
reassembly.c ipv6: drop packets with multiple fragmentation headers 2014-05-19 07:53:54 +02:00
route.c ipv6: use rt6_get_dflt_router to get default router in rt6_route_rcv 2014-05-19 07:53:57 +02:00
sit.c tunnels: fix netns vs proto registration ordering 2011-08-08 10:23:18 -07:00
syncookies.c percpu: clean up percpu variable definitions 2009-06-24 15:13:48 +09:00
sysctl_net_ipv6.c inet6: functions shadow global variable 2009-08-02 12:54:30 -07:00
tcp_ipv6.c inet: add RCU protection to inet->opt 2013-06-10 11:43:31 +02:00
tunnel6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
udp_impl.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
udp.c udp: properly support MSG_PEEK with truncated buffers 2016-01-29 22:12:41 +01:00
udplite.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
xfrm6_input.c netns xfrm: per-netns MIBs 2008-11-25 17:59:52 -08:00
xfrm6_mode_beet.c ipsec: be careful of non existing mac headers 2012-10-07 23:37:32 +02:00
xfrm6_mode_ro.c [IPSEC]: Make x->lastused an unsigned long 2008-01-28 14:53:52 -08:00
xfrm6_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm6_mode_tunnel.c ipsec: be careful of non existing mac headers 2012-10-07 23:37:32 +02:00
xfrm6_output.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xfrm6_policy.c xfrm6: Fix xfrm6_policy.c build when SYSCTL disabled. 2009-08-04 20:32:16 -07:00
xfrm6_state.c ipv6: fix sparse warning: Using plain integer as NULL pointer 2009-02-21 23:37:10 -08:00
xfrm6_tunnel.c ipv6: Fix return of xfrm6_tunnel_rcv() 2015-09-18 13:52:20 +02:00