Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: deref map in BPF_PROG_BIND_MAP when it's already used #165

Closed
wants to merge 2 commits into from

Commits on Oct 3, 2020

  1. adding ci files

    kernel-patches-bot committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    1be391e View commit details
    Browse the repository at this point in the history
  2. bpf: deref map in BPF_PROG_BIND_MAP when it's already used

    We are missing a deref for the case when we are doing BPF_PROG_BIND_MAP
    on a map that's being already held by the program.
    There is 'if (ret) bpf_map_put(map)' below which doesn't trigger
    because we don't consider this an error.
    Let's add missing bpf_map_put() for this specific condition.
    
    Fixes: ef15314 ("bpf: Add BPF_PROG_BIND_MAP syscall")
    Reported-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Stanislav Fomichev <sdf@google.com>
    fomichev authored and kernel-patches-bot committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    ad60e2d View commit details
    Browse the repository at this point in the history