diff options
author | Julian Anastasov <ja@ssi.bg> | 2005-09-08 13:34:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-08 13:34:47 -0700 |
commit | ce723d8e048ef98ea64d12379e3921c933f5b3e0 (patch) | |
tree | 368e85ac0014d203bba15bb8777ffbd94dc2d2e6 /lib/prio_tree.c | |
parent | c921e4c4dbb043f9435414c4e661e7f0a783053d (diff) | |
download | kernel_samsung_smdk4412-ce723d8e048ef98ea64d12379e3921c933f5b3e0.zip kernel_samsung_smdk4412-ce723d8e048ef98ea64d12379e3921c933f5b3e0.tar.gz kernel_samsung_smdk4412-ce723d8e048ef98ea64d12379e3921c933f5b3e0.tar.bz2 |
[IPV4]: Fix refcount damaging in net/ipv4/route.c
One such place that can damage the dst refcnts is route.c with
CONFIG_IP_ROUTE_MULTIPATH_CACHED enabled, i don't see the user's
.config. In this new code i see that rt_intern_hash is called before
dst->refcnt is set to 1, dst is the 2nd arg to rt_intern_hash.
Arg 2 of rt_intern_hash must come with refcnt 1 as it is added to
table or dropped depending on error/add/update. One such example is
ip_mkroute_input where __mkroute_input return rth with refcnt 0 which
is provided to rt_intern_hash. ip_mkroute_output looks like a 2nd such
place. Appending untested patch for comments and review. The idea is
to put previous reference as we are going to return next result/error.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/prio_tree.c')
0 files changed, 0 insertions, 0 deletions