Re: [PATCH bpf] bpf: Fix memlock accounting for sock_hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 11, 2020 at 5:09 PM Andrey Ignatov <rdna@xxxxxx> wrote:
>
> Add missed bpf_map_charge_init() in sock_hash_alloc() and
> correspondingly bpf_map_charge_finish() on ENOMEM.
>
> It was found accidentally while working on unrelated selftest that
> checks "map->memory.pages > 0" is true for all map types.
>
> Before:
>         # bpftool m l
>         ...
>         3692: sockhash  name m_sockhash  flags 0x0
>                 key 4B  value 4B  max_entries 8  memlock 0B
>
> After:
>         # bpftool m l
>         ...
>         84: sockmap  name m_sockmap  flags 0x0
>                 key 4B  value 4B  max_entries 8  memlock 4096B
>
> Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
> Signed-off-by: Andrey Ignatov <rdna@xxxxxx>

That's a nasty one. Good catch.
Applied.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux