Re: [PATCH v5 2/4] bpf: Add new bpf map type to store the pointer to struct perf_event
From: Alexei Starovoitov <hidden>
Date: 2015-07-31 16:39:39
Also in:
lkml
From: Alexei Starovoitov <hidden>
Date: 2015-07-31 16:39:39
Also in:
lkml
On 7/31/15 4:59 AM, Kaixu Xia wrote:
+ /*
+ * prevent some crazy events so we can make our life easier
+ */
+ if (event->attr.type != PERF_TYPE_RAW &&
+ event->attr.type != PERF_TYPE_HARDWARE) {
+ perf_event_release_kernel(event);
+ return ERR_PTR(-EINVAL);
+ }either remove the comment and make it clean.