diff options
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 486e65e3db26..469b20e1dd7e 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -31,6 +31,7 @@ struct bpf_map_ops { | |||
31 | void (*map_release)(struct bpf_map *map, struct file *map_file); | 31 | void (*map_release)(struct bpf_map *map, struct file *map_file); |
32 | void (*map_free)(struct bpf_map *map); | 32 | void (*map_free)(struct bpf_map *map); |
33 | int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key); | 33 | int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key); |
34 | void (*map_release_uref)(struct bpf_map *map); | ||
34 | 35 | ||
35 | /* funcs callable from userspace and from eBPF programs */ | 36 | /* funcs callable from userspace and from eBPF programs */ |
36 | void *(*map_lookup_elem)(struct bpf_map *map, void *key); | 37 | void *(*map_lookup_elem)(struct bpf_map *map, void *key); |
@@ -351,6 +352,7 @@ int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array, | |||
351 | struct bpf_prog **_prog, *__prog; \ | 352 | struct bpf_prog **_prog, *__prog; \ |
352 | struct bpf_prog_array *_array; \ | 353 | struct bpf_prog_array *_array; \ |
353 | u32 _ret = 1; \ | 354 | u32 _ret = 1; \ |
355 | preempt_disable(); \ | ||
354 | rcu_read_lock(); \ | 356 | rcu_read_lock(); \ |
355 | _array = rcu_dereference(array); \ | 357 | _array = rcu_dereference(array); \ |
356 | if (unlikely(check_non_null && !_array))\ | 358 | if (unlikely(check_non_null && !_array))\ |
@@ -362,6 +364,7 @@ int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array, | |||
362 | } \ | 364 | } \ |
363 | _out: \ | 365 | _out: \ |
364 | rcu_read_unlock(); \ | 366 | rcu_read_unlock(); \ |
367 | preempt_enable_no_resched(); \ | ||
365 | _ret; \ | 368 | _ret; \ |
366 | }) | 369 | }) |
367 | 370 | ||
@@ -434,7 +437,6 @@ int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value); | |||
434 | int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file, | 437 | int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file, |
435 | void *key, void *value, u64 map_flags); | 438 | void *key, void *value, u64 map_flags); |
436 | int bpf_fd_array_map_lookup_elem(struct bpf_map *map, void *key, u32 *value); | 439 | int bpf_fd_array_map_lookup_elem(struct bpf_map *map, void *key, u32 *value); |
437 | void bpf_fd_array_map_clear(struct bpf_map *map); | ||
438 | int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file, | 440 | int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file, |
439 | void *key, void *value, u64 map_flags); | 441 | void *key, void *value, u64 map_flags); |
440 | int bpf_fd_htab_map_lookup_elem(struct bpf_map *map, void *key, u32 *value); | 442 | int bpf_fd_htab_map_lookup_elem(struct bpf_map *map, void *key, u32 *value); |