diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2022-11-18 07:26:00 +0530 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-11-17 19:11:32 -0800 |
commit | b7ff97925b55a0603a7c215305df4b43ab632948 (patch) | |
tree | 2b0522134f08e737f364cfeaa6db0fa15b602e05 /net | |
parent | d0d78c1df9b1dbfb5e172de473561ce09d5e9d39 (diff) | |
download | linux-b7ff97925b55a0603a7c215305df4b43ab632948.tar.gz linux-b7ff97925b55a0603a7c215305df4b43ab632948.tar.bz2 linux-b7ff97925b55a0603a7c215305df4b43ab632948.zip |
bpf: Allow locking bpf_spin_lock in inner map values
There is no need to restrict users from locking bpf_spin_lock in map
values of inner maps. Each inner map lookup gets a unique reg->id
assigned to the returned PTR_TO_MAP_VALUE which will be preserved after
the NULL check. Distinct lookups into different inner map get unique
IDs, and distinct lookups into same inner map also get unique IDs.
Hence, lift the restriction by removing the check return -ENOTSUPP in
map_in_map.c. Later commits will add comprehensive test cases to ensure
that invalid cases are rejected.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20221118015614.2013203-11-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions