diff options
| author | Pu Lehui <[email protected]> | 2022-04-19 14:52:37 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-04-20 04:59:35 +0000 |
| commit | 5af25a410acb8d34acb11024d752f0ea3491decf (patch) | |
| tree | a25eef1a7a78ab9ce10fe2108f63719e03d0dbfa /tools/lib/bpf/libbpf.c | |
| parent | bpf: Fix usage of trace RCU in local storage. (diff) | |
| download | kernel-5af25a410acb8d34acb11024d752f0ea3491decf.tar.gz kernel-5af25a410acb8d34acb11024d752f0ea3491decf.zip | |
libbpf: Fix usdt_cookie being cast to 32 bits
The usdt_cookie is defined as __u64, which should not be
used as a long type because it will be cast to 32 bits
in 32-bit platforms.
Signed-off-by: Pu Lehui <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
| -rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 68cc134d070d..8375021800f3 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -10993,7 +10993,7 @@ struct bpf_link *bpf_program__attach_usdt(const struct bpf_program *prog, char resolved_path[512]; struct bpf_object *obj = prog->obj; struct bpf_link *link; - long usdt_cookie; + __u64 usdt_cookie; int err; if (!OPTS_VALID(opts, bpf_uprobe_opts)) |
