diff options
| author | Song Liu <[email protected]> | 2022-03-21 11:00:08 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-03-21 13:53:45 -0700 |
| commit | 96805674e5624b3c79780a2b41c7a3d6bc38dc76 (patch) | |
| tree | cb5323fa83da01aa49d7388482850e53fc6c627f /tools/testing/radix-tree/linux/kernel.h | |
| parent | d56c9fe6a06820d5ef8188d96bf4345c7bdba249 (diff) | |
bpf: Fix bpf_prog_pack for multi-node setup
module_alloc requires num_online_nodes * PMD_SIZE to allocate huge pages.
bpf_prog_pack uses pack of size num_online_nodes * PMD_SIZE.
OTOH, module_alloc returns addresses that are PMD_SIZE aligned (instead of
num_online_nodes * PMD_SIZE aligned). Therefore, PMD_MASK should be used
to calculate pack_ptr in bpf_prog_pack_free().
Fixes: ef078600eec2 ("bpf: Select proper size for bpf_prog_pack")
Reported-by: [email protected]
Signed-off-by: Song Liu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/radix-tree/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions