diff options
author | Wei Wang <[email protected]> | 2017-08-14 10:44:59 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2017-08-14 22:18:48 -0700 |
commit | e5645f51ba99738b0e5d708edf9c6454f33b9310 (patch) | |
tree | e9910540098f3c7aa709c7fd84e5e5a435ad29e9 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 36f41f8fc6d8aa9f8c9072d66ff7cf9055f5e69b (diff) |
ipv6: release rt6->rt6i_idev properly during ifdown
When a dst is created by addrconf_dst_alloc() for a host route or an
anycast route, dst->dev points to loopback dev while rt6->rt6i_idev
points to a real device.
When the real device goes down, the current cleanup code only checks for
dst->dev and assumes rt6->rt6i_idev->dev is the same. This causes the
refcount leak on the real device in the above situation.
This patch makes sure to always release the refcount taken on
rt6->rt6i_idev during dst_dev_put().
Fixes: 587fea741134 ("ipv6: mark DST_NOGC and remove the operation of
dst_free()")
Reported-by: John Stultz <[email protected]>
Tested-by: John Stultz <[email protected]>
Tested-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Wei Wang <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Acked-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions