summaryrefslogtreecommitdiff
path: root/bpf.h
blob: 3b0fef56f7a11e65fd5f2e94d740104f63eedda7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef BPF_I_H
#define BPF_I_H

#include <linux/filter.h>
#include <stdint.h>
#include <stdlib.h>

#include "bpf_insns.h"
#include "bpf_ext.h"
#include "config.h"
#include "die.h"

extern void bpf_dump_op_table(void);
extern void bpf_dump_all(struct sock_fprog *bpf);
extern int __bpf_validate(const struct sock_fprog *bpf);
extern uint32_t bpf_run_filter(const struct sock_fprog *bpf, uint8_t *packet,
			       size_t plen);
extern void bpf_attach_to_sock(int sock, struct sock_fprog *bpf);
extern void bpf_detach_from_sock(int sock);
extern int enable_kernel_bpf_jit_compiler(void);
extern void bpf_parse_rules(char *rulefile, struct sock_fprog *bpf, uint32_t link_type);
#if defined(HAVE_TCPDUMP_LIKE_FILTER) && defined(NEED_TCPDUMP_LIKE_FILTER)
extern void bpf_try_compile(const char *rulefile, struct sock_fprog *bpf,
			    uint32_t link_type);
#else
static inline void bpf_try_compile(const char *rulefile,
				   struct sock_fprog *bpf __maybe_unused,
				   uint32_t link_type __maybe_unused)
{
	panic("No libpcap support, cannot compile filter: %s\n", rulefile);
}
#endif
static inline void bpf_release(struct sock_fprog *bpf)
{
	free(bpf->filter);
}

#endif /* BPF_I_H */
78384553dddcf5b81b22'>43aff96c2ee21d9e0fa2018457778a4de52053cd /tools/objtool/builtin-check.c parent575ddce0507789bf9830d089557d2199d2f91865 (diff)
rt2x00: fix clk_get call
clk_get() takes two arguments and might return ERR_PTR(), so we have to nullify pointer on that case, to do not break further call to clk_get_rate(). Reported-by: Felix Fietkau <nbd@nbd.name> Fixes: 34db70b92fae ("rt2x00: add copy of clk for soc devices") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'tools/objtool/builtin-check.c')