-
Notifications
You must be signed in to change notification settings - Fork 150
bpf: Free special fields when update [lru_,]percpu_hash maps #10212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Upstream branch: 4cb4897 |
de0745f to
efe6edf
Compare
|
Upstream branch: b54a8e1 |
f834703 to
5ef8cc9
Compare
efe6edf to
f6af497
Compare
|
Upstream branch: b54a8e1 |
5ef8cc9 to
b742af3
Compare
f6af497 to
baaa336
Compare
|
Upstream branch: 6f1f4c1 |
b742af3 to
77c5f03
Compare
baaa336 to
b6555d5
Compare
|
Upstream branch: f8c67d8 |
77c5f03 to
dd2bdc7
Compare
|
Upstream branch: f8c67d8 |
dd2bdc7 to
6a3651e
Compare
Return -ETIMEDOUT whenever non-head waiters are signalled by head, and fix oversight in commit 7bd6e5c ("rqspinlock: Disable queue destruction for deadlocks"). We no longer signal on deadlocks. Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
b6555d5 to
910d3ce
Compare
As [lru_,]percpu_hash maps support BPF_KPTR_{REF,PERCPU}, missing
calls to 'bpf_obj_free_fields()' in 'pcpu_copy_value()' could cause the
memory referenced by BPF_KPTR_{REF,PERCPU} fields to be held until the
map gets freed.
Fix this by calling 'bpf_obj_free_fields()' after
'copy_map_value[,_long]()' in 'pcpu_copy_value()'.
Fixes: 65334e6 ("bpf: Support kptrs in percpu hashmap and percpu LRU hashmap")
Signed-off-by: Leon Hwang <[email protected]>
Acked-by: Yonghong Song <[email protected]>
…ate [lru_,]percpu_hash maps Add test to verify that updating [lru_,]percpu_hash maps decrements refcount when BPF_KPTR_REF objects are involved. The tests perform the following steps: 1. Call update_elem() to insert an initial value. 2. Use bpf_refcount_acquire() to increment the refcount. 3. Store the node pointer in the map value. 4. Add the node to a linked list. 5. Probe-read the refcount and verify it is *2*. 6. Call update_elem() again to trigger refcount decrement. 7. Probe-read the refcount and verify it is *1*. Signed-off-by: Leon Hwang <[email protected]> Acked-by: Yonghong Song <[email protected]>
|
Upstream branch: 026bcf9 |
6a3651e to
a1ead8e
Compare
910d3ce to
50dc55d
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1019940 irrelevant now. Closing PR. |
Pull request for series with
subject: bpf: Free special fields when update [lru_,]percpu_hash maps
version: 6
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1019940