diff options
| author | Mykyta Yatsenko <yatsenko@meta.com> | 2025-10-26 20:38:52 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-10-27 09:56:27 -0700 |
| commit | 2c52e8943a437af6093d8b0f0920f1764f0e5f64 (patch) | |
| tree | 68e993ce0973cc679de4fb7087f64068b77b22f8 /tools/testing/selftests/bpf/prog_tests/file_reader.c | |
| parent | d869d56ca848415b1169ba08b4f92a32968de8a2 (diff) | |
bpf: dispatch to sleepable file dynptr
File dynptr reads may sleep when the requested folios are not in
the page cache. To avoid sleeping in non-sleepable contexts while still
supporting valid sleepable use, given that dynptrs are non-sleepable by
default, enable sleeping only when bpf_dynptr_from_file() is invoked
from a sleepable context.
This change:
* Introduces a sleepable constructor: bpf_dynptr_from_file_sleepable()
* Override non-sleepable constructor with sleepable if it's always
called in sleepable context
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251026203853.135105-10-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/file_reader.c')
0 files changed, 0 insertions, 0 deletions
