diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-11 02:50:05 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-11 02:50:05 -0500 |
| commit | 73cf7e111ed69d8e1b59a3ae41b14bc77215e9ee (patch) | |
| tree | 02cd3308d328bce9cf97bf2c1c9d5e932103ebfe /samples | |
| parent | 328257099077e8affd438c179d8a938948de2e7f (diff) | |
| parent | 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff) | |
Merge 4.15-rc3 into driver-core-next
We want the fixes and changes in here for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/bpf/bpf_load.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index 522ca9252d6c..242631aa4ea2 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c | |||
| @@ -193,8 +193,18 @@ static int load_and_attach(const char *event, struct bpf_insn *prog, int size) | |||
| 193 | return -1; | 193 | return -1; |
| 194 | } | 194 | } |
| 195 | event_fd[prog_cnt - 1] = efd; | 195 | event_fd[prog_cnt - 1] = efd; |
| 196 | ioctl(efd, PERF_EVENT_IOC_ENABLE, 0); | 196 | err = ioctl(efd, PERF_EVENT_IOC_ENABLE, 0); |
| 197 | ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); | 197 | if (err < 0) { |
| 198 | printf("ioctl PERF_EVENT_IOC_ENABLE failed err %s\n", | ||
| 199 | strerror(errno)); | ||
| 200 | return -1; | ||
| 201 | } | ||
| 202 | err = ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); | ||
| 203 | if (err < 0) { | ||
| 204 | printf("ioctl PERF_EVENT_IOC_SET_BPF failed err %s\n", | ||
| 205 | strerror(errno)); | ||
| 206 | return -1; | ||
| 207 | } | ||
| 198 | 208 | ||
| 199 | return 0; | 209 | return 0; |
| 200 | } | 210 | } |
