Pull bpf fixes from Alexei Starovoitov: - Replace bpf_map_kmalloc_node() with kmalloc_nolock() to fix kmemleak imbalance in tracking of bpf_async_cb structures (Alexei Starovoitov) - Make selftests/bpf arg_parsing.c more robust to errors (Andrii Nakryiko) - Fix redefinition of 'off' as different kind of symbol when I40E driver is builtin (Brahmajit Das) - Do not disable preemption in bpf_test_run (Sahil Chandna) - Fix memory leak in __lookup_instance error path (Shardul Bankar) - Ensure test data is flushed to disk before reading it (Xing Guo) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Fix redefinition of 'off' as different kind of symbol bpf: Do not disable preemption in bpf_test_run(). bpf: Fix memory leak in __lookup_instance error path selftests: arg_parsing: Ensure data is flushed to disk before reading. bpf: Replace bpf_map_kmalloc_node() with kmalloc_nolock() to allocate bpf_async_cb structures. selftests/bpf: make arg_parsing.c more robust to crashes bpf: test_run: Fix ctx leak in bpf_prog_test_run_xdp error path
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -2499,6 +2499,8 @@ int bpf_map_alloc_pages(const struct bpf_map *map, int nid, · 2498 unmodified lines | ||
| 2499 | 2499 | #ifdef CONFIG_MEMCG |
| 2500 | 2500 | void *bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags, |
| 2501 | 2501 | int node); |
| 2502 | +void *bpf_map_kmalloc_nolock(const struct bpf_map *map, size_t size, gfp_t flags, | |
| 2503 | + int node); | |
| 2502 | 2504 | void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags); |
| 2503 | 2505 | void *bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size, |
| 2504 | 2506 | gfp_t flags); |
| @@ -2511,6 +2513,8 @@ void __percpu *bpf_map_alloc_percpu(const struct bpf_map *map, size_t size, · 6 unmodified lines | ||
| 2511 | 2513 | */ |
| 2512 | 2514 | #define bpf_map_kmalloc_node(_map, _size, _flags, _node) \ |
| 2513 | 2515 | kmalloc_node(_size, _flags, _node) |
| 2516 | +#define bpf_map_kmalloc_nolock(_map, _size, _flags, _node) \ | |
| 2517 | + kmalloc_nolock(_size, _flags, _node) | |
| 2514 | 2518 | #define bpf_map_kzalloc(_map, _size, _flags) \ |
| 2515 | 2519 | kzalloc(_size, _flags) |
| 2516 | 2520 | #define bpf_map_kvcalloc(_map, _n, _size, _flags) \ |