diff options
author | Yonghong Song <yhs@fb.com> | 2022-11-24 08:32:11 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-11-24 23:27:13 +0300 |
commit | 01685c5bddaa6df3d662c8afed5e5289fcc68e5a (patch) | |
tree | 449b395cbda9dc78cb39ae8cd1bfe15ee0e1aa16 /include/linux/bpf.h | |
parent | 5a0f663f0189cf9e031e444f97c029717a99548d (diff) | |
download | linux-01685c5bddaa6df3d662c8afed5e5289fcc68e5a.tar.xz |
bpf: Introduce might_sleep field in bpf_func_proto
Introduce bpf_func_proto->might_sleep to indicate a particular helper
might sleep. This will make later check whether a helper might be
sleepable or not easier.
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20221124053211.2373553-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index c9eafa67f2a2..43fd7eeeeabb 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -682,6 +682,7 @@ struct bpf_func_proto { u64 (*func)(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5); bool gpl_only; bool pkt_access; + bool might_sleep; enum bpf_return_type ret_type; union { struct { |