diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-02-27 17:03:14 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-02-27 17:03:14 -0800 |
commit | 3bcd60444519616508f72df454cc596511e726d1 (patch) | |
tree | c081bdb931c9c0d7a9a30ff44d421e673e3f3bea /kernel | |
parent | d2e614cb0795d935aee879e47aab231247274f13 (diff) | |
parent | 9eca5083757b679b37f210092c871916c2c222d0 (diff) | |
download | lwn-3bcd60444519616508f72df454cc596511e726d1.tar.gz lwn-3bcd60444519616508f72df454cc596511e726d1.zip |
Merge branch 'inner_map_spin_lock-fix'
Yonghong Song says:
====================
The inner_map_meta->spin_lock_off is not set correctly during
map creation for BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS.
This may lead verifier error due to misinformation.
This patch set fixed the issue with Patch #1 for the kernel change
and Patch #2 for enhanced selftest test_maps.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/map_in_map.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/map_in_map.c b/kernel/bpf/map_in_map.c index 583346a0ab29..3dff41403583 100644 --- a/kernel/bpf/map_in_map.c +++ b/kernel/bpf/map_in_map.c @@ -58,6 +58,7 @@ struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) inner_map_meta->value_size = inner_map->value_size; inner_map_meta->map_flags = inner_map->map_flags; inner_map_meta->max_entries = inner_map->max_entries; + inner_map_meta->spin_lock_off = inner_map->spin_lock_off; /* Misc members not needed in bpf_map_meta_equal() check. */ inner_map_meta->ops = inner_map->ops; |