commit | 254f46f3b2124b01722016f21332a861c29d4d1e | [log] [tgz] |
---|---|---|
author | Alexei Starovoitov <ast@fb.com> | Wed Jun 15 15:31:58 2016 -0700 |
committer | Alexei Starovoitov <ast@fb.com> | Wed Jun 15 15:51:10 2016 -0700 |
tree | 3ac04b1a49dd4c8c2a2ff189b482b35c33f8d0bd | |
parent | 6b486206a6e64fbeafdd5f492d3e2bac809a788a [diff] |
bpf, trace: check event type in bpf_perf_event_read similar to bpf_perf_event_output() the bpf_perf_event_read() helper needs to check the type of the perf_event before doing reading the counter. Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> --- the fix is minor. No need for stable backport.