forked from gregkh/linux
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hou Tao says: ==================== This patch set fixes several issues for LPM trie. These issues were found during adding new test cases or were reported by syzbot. The patch set is structured as follows: Patch gregkh#1~gregkh#2 are clean-ups for lpm_trie_update_elem(). Patch gregkh#3 handles BPF_EXIST and BPF_NOEXIST correctly for LPM trie. Patch gregkh#4 fixes the accounting of n_entries when doing in-place update. Patch gregkh#5 fixes the exact match condition in trie_get_next_key() and it may skip keys when the passed key is not found in the map. Patch gregkh#6~gregkh#7 switch from kmalloc() to bpf memory allocator for LPM trie to fix several lock order warnings reported by syzbot. It also enables raw_spinlock_t for LPM trie again. After these changes, the LPM trie will be closer to being usable in any context (though the reentrance check of trie->lock is still missing, but it is on my todo list). Patch gregkh#8: move test_lpm_map to map_tests to make it run regularly. Patch gregkh#9: add test cases for the issues fixed by patch gregkh#3~gregkh#5. Please see individual patches for more details. Comments are always welcome. Change Log: v3: * patch gregkh#2: remove the unnecessary NULL-init for im_node * patch gregkh#6: alloc the leaf node before disabling IRQ to low the possibility of -ENOMEM when leaf_size is large; Free these nodes outside the trie lock (Suggested by Alexei) * collect review and ack tags (Thanks for Toke & Daniel) v2: https://lore.kernel.org/bpf/[email protected]/ * collect review tags (Thanks for Toke) * drop "Add bpf_mem_cache_is_mergeable() helper" patch * patch gregkh#3~gregkh#4: add fix tag * patch gregkh#4: rename the helper to trie_check_add_elem() and increase n_entries in it. * patch gregkh#6: use one bpf mem allocator and update commit message to clarify that using bpf mem allocator is more appropriate. * patch gregkh#7: update commit message to add the possible max running time for update operation. * patch gregkh#9: update commit message to specify the purpose of these test cases. v1: https://lore.kernel.org/bpf/[email protected]/ ==================== Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Alexei Starovoitov <[email protected]>
- Loading branch information
Showing
4 changed files
with
484 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.