On Fri, Nov 8, 2019 at 4:00 PM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > > Since the automatic map-pinning happens during load, it will leave pinned > maps around if the load fails at a later stage. Fix this by unpinning any > pinned maps on cleanup. To avoid unpinning pinned maps that were reused > rather than newly pinned, add a new boolean property on struct bpf_map to > keep track of whether that map was reused or not; and only unpin those maps > that were not reused. > > Fixes: 57a00f41644f ("libbpf: Add auto-pinning of maps when loading BPF objects") > Acked-by: David S. Miller <davem@xxxxxxxxxxxxx> > Acked-by: Song Liu <songliubraving@xxxxxx> > Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > --- Acked-by: Andrii Nakryiko <andriin@xxxxxx> [...]