-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: Free special fields when update [lru_,]percpu_hash maps #6298
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
bpf: Free special fields when update [lru_,]percpu_hash maps #6298
Conversation
|
Upstream branch: 4cb4897 |
c95b89c to
828eff8
Compare
|
Upstream branch: b54a8e1 |
82bd1da to
d27b83c
Compare
828eff8 to
03f9e36
Compare
|
Upstream branch: b54a8e1 |
d27b83c to
dfc07c8
Compare
03f9e36 to
97961e6
Compare
|
Upstream branch: 6f1f4c1 |
dfc07c8 to
a198e21
Compare
97961e6 to
2456350
Compare
|
Upstream branch: f8c67d8 |
a198e21 to
9a9e418
Compare
|
Upstream branch: f8c67d8 |
9a9e418 to
476562c
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]>
2456350 to
4eb9670
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 |
476562c to
5bb4bc1
Compare
4eb9670 to
e1b05fd
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