projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0838181
)
bpf: Use bpf_map_area_free instread of kvfree
author
Yafang Shao
<laoar.shao@gmail.com>
Wed, 10 Aug 2022 15:18:27 +0000
(15:18 +0000)
committer
Alexei Starovoitov
<ast@kernel.org>
Wed, 10 Aug 2022 18:48:44 +0000
(11:48 -0700)
bpf_map_area_alloc() should be paired with bpf_map_area_free().
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link:
https://lore.kernel.org/r/20220810151840.16394-3-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/ringbuf.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/ringbuf.c
b/kernel/bpf/ringbuf.c
index
ded4fae
..
3fb54fe
100644
(file)
--- a/
kernel/bpf/ringbuf.c
+++ b/
kernel/bpf/ringbuf.c
@@
-116,7
+116,7
@@
static struct bpf_ringbuf *bpf_ringbuf_area_alloc(size_t data_sz, int numa_node)
err_free_pages:
for (i = 0; i < nr_pages; i++)
__free_page(pages[i]);
-
kv
free(pages);
+
bpf_map_area_
free(pages);
return NULL;
}
@@
-190,7
+190,7
@@
static void bpf_ringbuf_free(struct bpf_ringbuf *rb)
vunmap(rb);
for (i = 0; i < nr_pages; i++)
__free_page(pages[i]);
-
kv
free(pages);
+
bpf_map_area_
free(pages);
}
static void ringbuf_map_free(struct bpf_map *map)