linux/drivers/net
Wei Wang 1cfb71eeb1 ipv6: take dst->__refcnt for insertion into fib6 tree
In IPv6 routing code, struct rt6_info is created for each static route
and RTF_CACHE route and inserted into fib6 tree. In both cases, dst
ref count is not taken.
As explained in the previous patch, this leads to the need of the dst
garbage collector.

This patch holds ref count of dst before inserting the route into fib6
tree and properly releases the dst when deleting it from the fib6 tree
as a preparation in order to fully get rid of dst gc later.

Also, correct fib6_age() logic to check dst->__refcnt to be 1 to indicate
no user is referencing the dst.

And remove dst_hold() in vrf_rt6_create() as ip6_dst_alloc() already puts
dst->__refcnt to 1.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-17 22:54:00 -04:00
..
appletalk Annotate hardware config module parameters in drivers/net/appletalk/ 2017-04-20 12:02:32 +01:00
arcnet networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
bonding networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
caif networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
can networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
cris net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
dsa net: dsa: loop: Implement ethtool statistics 2017-06-16 12:43:48 -04:00
ethernet mlx5-updates-2017-06-16 2017-06-16 15:22:42 -04:00
fddi format-security: move static strings to const 2017-05-08 17:15:14 -07:00
fjes networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hamradio networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hippi networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
hyperv networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ieee802154 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
irda networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
plip
ppp networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
slip networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
usb networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
vmxnet3 vmxnet3: ensure that adapter is in proper state during force_close 2017-05-12 12:23:52 -04:00
wan networking: make skb_pull & friends return void pointers 2017-06-16 11:48:39 -04:00
wimax networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
wireless networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
xen-netback
dummy.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
eql.c
geneve.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
gtp.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
ifb.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
Kconfig VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
LICENSE.SRC
loopback.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
macsec.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
macvtap.c
Makefile VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
mdio.c
mii.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
netconsole.c netconsole: Remove duplicate "netconsole: " logging prefix 2017-06-13 12:57:40 -04:00
nlmon.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c drivers/net/sungem: add const to mii_phy_ops structures 2017-06-08 15:32:47 -04:00
tap.c tap: support receiving skb from msg_control 2017-05-18 10:07:41 -04:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
veth.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
virtio_net.c bpf: virtio_net: Report bpf_prog ID during XDP_QUERY_PROG 2017-06-16 11:58:36 -04:00
vrf.c ipv6: take dst->__refcnt for insertion into fib6 tree 2017-06-17 22:54:00 -04:00
vsockmon.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
vxlan.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
xen-netfront.c xen-netfront: avoid crashing on resume after a failure in talk_to_netback() 2017-05-11 21:38:50 -04:00