diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
| commit | 4083014e32699af04a8e6eaa4855b08dba36a47a (patch) | |
| tree | fa37f9f9691fe64ca8a3c0cdc0315dc12462e6e4 /kernel/bpf/syscall.c | |
| parent | 6fd96ff557963de8e62842a0dc360a6e3610d2bb (diff) | |
| parent | 78153dd45e7e0596ba32b15d02bda08e1513111e (diff) | |
Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next
Merge several updates to the ARS implementation. Highlights include:
* Support retrieval of short-ARS results if the ARS state is "requires
continuation", and even if the "no_init_ars" module parameter is
specified.
* Allow busy-polling of the kernel ARS state by allowing root to reset
the exponential back-off timer.
* Filter potentially stale ARS results by tracking query-ARS relative to
the previous start-ARS.
Diffstat (limited to 'kernel/bpf/syscall.c')
| -rw-r--r-- | kernel/bpf/syscall.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index b155cd17c1bd..8577bb7f8be6 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c | |||
| @@ -713,8 +713,13 @@ static int map_lookup_elem(union bpf_attr *attr) | |||
| 713 | 713 | ||
| 714 | if (bpf_map_is_dev_bound(map)) { | 714 | if (bpf_map_is_dev_bound(map)) { |
| 715 | err = bpf_map_offload_lookup_elem(map, key, value); | 715 | err = bpf_map_offload_lookup_elem(map, key, value); |
| 716 | } else if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || | 716 | goto done; |
| 717 | map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH) { | 717 | } |
| 718 | |||
| 719 | preempt_disable(); | ||
| 720 | this_cpu_inc(bpf_prog_active); | ||
| 721 | if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || | ||
| 722 | map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH) { | ||
| 718 | err = bpf_percpu_hash_copy(map, key, value); | 723 | err = bpf_percpu_hash_copy(map, key, value); |
| 719 | } else if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { | 724 | } else if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { |
| 720 | err = bpf_percpu_array_copy(map, key, value); | 725 | err = bpf_percpu_array_copy(map, key, value); |
| @@ -744,7 +749,10 @@ static int map_lookup_elem(union bpf_attr *attr) | |||
| 744 | } | 749 | } |
| 745 | rcu_read_unlock(); | 750 | rcu_read_unlock(); |
| 746 | } | 751 | } |
| 752 | this_cpu_dec(bpf_prog_active); | ||
| 753 | preempt_enable(); | ||
| 747 | 754 | ||
| 755 | done: | ||
| 748 | if (err) | 756 | if (err) |
| 749 | goto free_value; | 757 | goto free_value; |
| 750 | 758 | ||
