diff options
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 9eb4d8a7cd87..8a6616583f38 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c | |||
@@ -134,7 +134,7 @@ static void array_map_free(struct bpf_map *map) | |||
134 | kvfree(array); | 134 | kvfree(array); |
135 | } | 135 | } |
136 | 136 | ||
137 | static struct bpf_map_ops array_ops = { | 137 | static const struct bpf_map_ops array_ops = { |
138 | .map_alloc = array_map_alloc, | 138 | .map_alloc = array_map_alloc, |
139 | .map_free = array_map_free, | 139 | .map_free = array_map_free, |
140 | .map_get_next_key = array_map_get_next_key, | 140 | .map_get_next_key = array_map_get_next_key, |
@@ -143,14 +143,14 @@ static struct bpf_map_ops array_ops = { | |||
143 | .map_delete_elem = array_map_delete_elem, | 143 | .map_delete_elem = array_map_delete_elem, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct bpf_map_type_list tl = { | 146 | static struct bpf_map_type_list array_type __read_mostly = { |
147 | .ops = &array_ops, | 147 | .ops = &array_ops, |
148 | .type = BPF_MAP_TYPE_ARRAY, | 148 | .type = BPF_MAP_TYPE_ARRAY, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | static int __init register_array_map(void) | 151 | static int __init register_array_map(void) |
152 | { | 152 | { |
153 | bpf_register_map_type(&tl); | 153 | bpf_register_map_type(&array_type); |
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | late_initcall(register_array_map); | 156 | late_initcall(register_array_map); |