diff options
| author | Ingo Molnar <mingo@kernel.org> | 2019-06-24 19:19:53 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-06-24 19:19:53 +0200 |
| commit | d2abae71ebcc409828b24ce9da402548ecdf1311 (patch) | |
| tree | 5edfafc2828d3bcebb3698520ccba374cd4328c0 /samples/bpf | |
| parent | 66567fcbaecac455caa1b13643155d686b51ce63 (diff) | |
| parent | 4b972a01a7da614b4796475f933094751a295a2f (diff) | |
Merge tag 'v5.2-rc6' into sched/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'samples/bpf')
| -rw-r--r-- | samples/bpf/bpf_load.c | 2 | ||||
| -rw-r--r-- | samples/bpf/task_fd_query_user.c | 2 | ||||
| -rw-r--r-- | samples/bpf/xdp_redirect_cpu_user.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index eae7b635343d..6e87cc831e84 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c @@ -678,7 +678,7 @@ void read_trace_pipe(void) static char buf[4096]; ssize_t sz; - sz = read(trace_fd, buf, sizeof(buf)); + sz = read(trace_fd, buf, sizeof(buf) - 1); if (sz > 0) { buf[sz] = 0; puts(buf); diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_user.c index aff2b4ae914e..e39938058223 100644 --- a/samples/bpf/task_fd_query_user.c +++ b/samples/bpf/task_fd_query_user.c @@ -216,7 +216,7 @@ static int test_debug_fs_uprobe(char *binary_path, long offset, bool is_return) { const char *event_type = "uprobe"; struct perf_event_attr attr = {}; - char buf[256], event_alias[256]; + char buf[256], event_alias[sizeof("test_1234567890")]; __u64 probe_offset, probe_addr; __u32 len, prog_id, fd_type; int err, res, kfd, efd; diff --git a/samples/bpf/xdp_redirect_cpu_user.c b/samples/bpf/xdp_redirect_cpu_user.c index 586b294d72d3..575deaca429f 100644 --- a/samples/bpf/xdp_redirect_cpu_user.c +++ b/samples/bpf/xdp_redirect_cpu_user.c @@ -1,4 +1,5 @@ -/* GPLv2 Copyright(c) 2017 Jesper Dangaard Brouer, Red Hat, Inc. +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright(c) 2017 Jesper Dangaard Brouer, Red Hat, Inc. */ static const char *__doc__ = " XDP redirect with a CPU-map type \"BPF_MAP_TYPE_CPUMAP\""; |