net: convert fib_treeref from int to refcount_t
authorYajun Deng <yajun.deng@linux.dev>
Thu, 29 Jul 2021 07:13:50 +0000 (15:13 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Jul 2021 13:33:24 +0000 (15:33 +0200)
commit79976892f7ea37f44f8bcfb6d266954e8ae0124d
tree9e438088b39b37c3f5cb1152cb59d284f9adaf8a
parent3e12361b6d23f793580a50a6008633501c56ea1d
net: convert fib_treeref from int to refcount_t

refcount_t type should be used instead of int when fib_treeref is used as
a reference counter,and avoid use-after-free risks.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20210729071350.28919-1-yajun.deng@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dn_fib.h
include/net/ip_fib.h
net/decnet/dn_fib.c
net/ipv4/fib_semantics.c