diff options
Diffstat (limited to 'kernel/bpf/sockmap.c')
-rw-r--r-- | kernel/bpf/sockmap.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index 079968680bc3..0314d1783d77 100644 --- a/kernel/bpf/sockmap.c +++ b/kernel/bpf/sockmap.c | |||
@@ -513,13 +513,7 @@ static struct bpf_map *sock_map_alloc(union bpf_attr *attr) | |||
513 | if (!stab) | 513 | if (!stab) |
514 | return ERR_PTR(-ENOMEM); | 514 | return ERR_PTR(-ENOMEM); |
515 | 515 | ||
516 | /* mandatory map attributes */ | 516 | bpf_map_init_from_attr(&stab->map, attr); |
517 | stab->map.map_type = attr->map_type; | ||
518 | stab->map.key_size = attr->key_size; | ||
519 | stab->map.value_size = attr->value_size; | ||
520 | stab->map.max_entries = attr->max_entries; | ||
521 | stab->map.map_flags = attr->map_flags; | ||
522 | stab->map.numa_node = bpf_map_attr_numa_node(attr); | ||
523 | 517 | ||
524 | /* make sure page count doesn't overflow */ | 518 | /* make sure page count doesn't overflow */ |
525 | cost = (u64) stab->map.max_entries * sizeof(struct sock *); | 519 | cost = (u64) stab->map.max_entries * sizeof(struct sock *); |