diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-09-15 10:23:28 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2025-09-15 10:23:28 +0200 |
commit | b4d90dbc4c1bc4bd3eb2d2989330af0eb95c98e8 (patch) | |
tree | 5670a6d87e7cb5c421809babf9dc9e72ff40f8ae /kernel/bpf/arraymap.c | |
parent | 54d4f445517fe8350d735624d7f4225e7511d9eb (diff) | |
parent | 0d9f0083f7a5a31d91d501467b499bb8c4b25bdf (diff) |
Merge drm/drm-next into drm-misc-next-fixes
Backmerging to drm-misc-next-fixes to get features and fixes from
v6.17-rc6.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index eb28c0f219ee..3d080916faf9 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -530,8 +530,6 @@ static int array_map_check_btf(const struct bpf_map *map, const struct btf_type *key_type, const struct btf_type *value_type) { - u32 int_data; - /* One exception for keyless BTF: .bss/.data/.rodata map */ if (btf_type_is_void(key_type)) { if (map->map_type != BPF_MAP_TYPE_ARRAY || @@ -544,14 +542,11 @@ static int array_map_check_btf(const struct bpf_map *map, return 0; } - if (BTF_INFO_KIND(key_type->info) != BTF_KIND_INT) - return -EINVAL; - - int_data = *(u32 *)(key_type + 1); - /* bpf array can only take a u32 key. This check makes sure + /* + * Bpf array can only take a u32 key. This check makes sure * that the btf matches the attr used during map_create. */ - if (BTF_INT_BITS(int_data) != 32 || BTF_INT_OFFSET(int_data)) + if (!btf_type_is_i32(key_type)) return -EINVAL; return 0; |