diff options
| author | Alexei Starovoitov <[email protected]> | 2025-04-25 15:36:59 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2025-04-25 15:37:21 +0000 |
| commit | 6ae003adc029c74e7f97cc65dc1e79109a1f2d67 (patch) | |
| tree | 4c40aabec804482096aa1993ebb93a92ebc74d64 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure (diff) | |
| parent | selftests/bpf: add test for softlock when modifying hashmap while iterating (diff) | |
| download | kernel-6ae003adc029c74e7f97cc65dc1e79109a1f2d67.tar.gz kernel-6ae003adc029c74e7f97cc65dc1e79109a1f2d67.zip | |
Merge branch 'bpf-fix-softlock-condition-in-bpf-hashmap-interation'
Brandon Kammerdiener says:
====================
This patchset fixes an endless loop condition that can occur in
bpf_for_each_hash_elem, causing the core to softlock. My understanding is
that a combination of RCU list deletion and insertion introduces the new
element after the iteration cursor and that there is a chance that an RCU
reader may in fact use this new element in iteration. The patch uses a
_safe variant of the macro which gets the next element to iterate before
executing the loop body for the current element.
I have also added a subtest in the for_each selftest that can trigger this
condition without the fix.
Changes since v2:
- Renaming and additional checks in selftests/bpf/prog_tests/for_each.c
Changes since v1:
- Added missing Signed-off-by lines to both patches
====================
Acked-by: Hou Tao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
