diff options
author | 2025-01-17 18:18:14 +0800 | |
---|---|---|
committer | 2025-01-20 09:09:01 -0800 | |
commit | 47363f1553e69b8c2e3269f9883799a4ea898cd4 (patch) | |
tree | d99b35e82c4ba442ed37549d2c2158a010146222 /scripts/lib/kdoc/kdoc_parser.py | |
parent | bpf: Bail out early in __htab_map_lookup_and_delete_elem() (diff) | |
download | linux-rng-47363f1553e69b8c2e3269f9883799a4ea898cd4.tar.xz linux-rng-47363f1553e69b8c2e3269f9883799a4ea898cd4.zip |
bpf: Free element after unlock in __htab_map_lookup_and_delete_elem()
The freeing of special fields in map value may acquire a spin-lock
(e.g., the freeing of bpf_timer), however, the lookup_and_delete_elem
procedure has already held a raw-spin-lock, which violates the lockdep
rule.
The running context of __htab_map_lookup_and_delete_elem() has already
disabled the migration. Therefore, it is OK to invoke free_htab_elem()
after unlocking the bucket lock.
Fix the potential problem by freeing element after unlocking bucket lock
in __htab_map_lookup_and_delete_elem().
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20250117101816.2101857-4-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions