projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7c5802
)
bpf: Remove unneeded memset in queue_stack_map creation
author
Yafang Shao
<laoar.shao@gmail.com>
Wed, 10 Aug 2022 15:18:26 +0000
(15:18 +0000)
committer
Alexei Starovoitov
<ast@kernel.org>
Wed, 10 Aug 2022 18:48:22 +0000
(11:48 -0700)
__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>
kernel/bpf/queue_stack_maps.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/queue_stack_maps.c
b/kernel/bpf/queue_stack_maps.c
index
a1c0794
..
8a5e060
100644
(file)
--- 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;