diff options
author | Martin KaFai Lau <[email protected]> | 2015-10-15 16:39:58 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2015-10-16 00:39:16 -0700 |
commit | 0a1f59620068fb82a2e2aded202e62f4bb856d52 (patch) | |
tree | 34b1c01554617573d9da4389ff3c6955f677e6b4 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | ebfa45f0d952e5e7bb30a7f9daaad681de138728 (diff) |
ipv6: Initialize rt6_info properly in ip6_blackhole_route()
ip6_blackhole_route() does not initialize the newly allocated
rt6_info properly. This patch:
1. Call rt6_info_init() to initialize rt6i_siblings and rt6i_uncached
2. The current rt->dst._metrics init code is incorrect:
- 'rt->dst._metrics = ort->dst._metris' is not always safe
- Not sure what dst_copy_metrics() is trying to do here
considering ip6_rt_blackhole_cow_metrics() always returns
NULL
Fix:
- Always do dst_copy_metrics()
- Replace ip6_rt_blackhole_cow_metrics() with
dst_cow_metrics_generic()
3. Mask out the RTF_PCPU bit from the newly allocated blackhole route.
This bug triggers an oops (reported by Phil Sutter) in rt6_get_cookie().
It is because RTF_PCPU is set while rt->dst.from is NULL.
Fixes: d52d3997f843 ("ipv6: Create percpu rt6_info")
Signed-off-by: Martin KaFai Lau <[email protected]>
Reported-by: Phil Sutter <[email protected]>
Tested-by: Phil Sutter <[email protected]>
Cc: Hannes Frederic Sowa <[email protected]>
Cc: Julian Anastasov <[email protected]>
Cc: Phil Sutter <[email protected]>
Cc: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions