diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2022-08-10 17:18:26 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-08-10 20:48:22 +0200 |
commit | 083818156d1e98f22b1ac612a3957bc553e7ba57 (patch) | |
tree | 77d7182c2acf37b884c4710abe8130ddd2ff2e22 /kernel/bpf/queue_stack_maps.c | |
parent | libbpf: preserve errno across pr_warn/pr_info/pr_debug (diff) | |
download | linux-083818156d1e98f22b1ac612a3957bc553e7ba57.tar.xz linux-083818156d1e98f22b1ac612a3957bc553e7ba57.zip |
bpf: Remove unneeded memset in queue_stack_map creation
__GFP_ZERO will clear the memory, so we don't need to memset it.
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20220810151840.16394-2-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/queue_stack_maps.c')
-rw-r--r-- | kernel/bpf/queue_stack_maps.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c index a1c0794ae49d..8a5e060de63b 100644 --- a/kernel/bpf/queue_stack_maps.c +++ b/kernel/bpf/queue_stack_maps.c @@ -78,8 +78,6 @@ static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) if (!qs) return ERR_PTR(-ENOMEM); - memset(qs, 0, sizeof(*qs)); - bpf_map_init_from_attr(&qs->map, attr); qs->size = size; |