BPF List
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org
Cc: "Björn Töpel" <bjorn.topel@gmail.com>,
	magnus.karlsson@intel.com, magnus.karlsson@gmail.com,
	bpf@vger.kernel.org, u9012063@gmail.com
Subject: [PATCH bpf 0/2] libbpf: fixes for AF_XDP teardown
Date: Tue, 30 Apr 2019 14:45:34 +0200	[thread overview]
Message-ID: <20190430124536.7734-1-bjorn.topel@gmail.com> (raw)

William found two bugs, when doing socket teardown within the same
process.

The first issue was an invalid munmap call, and the second one was an
invalid XSKMAP cleanup. Both resulted in that the process kept
references to the socket, which was not correctly cleaned up. When a
new socket was created, the bind() call would fail, since the old
socket was still lingering, refusing to give up the queue on the
netdev.

More details can be found in the individual commits.

Thanks,
Björn


Björn Töpel (2):
  libbpf: fix invalid munmap call
  libbpf: proper XSKMAP cleanup

 tools/lib/bpf/xsk.c | 192 +++++++++++++++++++++++---------------------
 1 file changed, 100 insertions(+), 92 deletions(-)

-- 
2.20.1


             reply	other threads:[~2019-04-30 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 12:45 Björn Töpel [this message]
2019-04-30 12:45 ` [PATCH bpf 1/2] libbpf: fix invalid munmap call Björn Töpel
2019-05-01  3:36   ` William Tu
2019-05-06  8:26   ` Daniel Borkmann
2019-05-06  8:40     ` Björn Töpel
2019-05-06  9:01       ` Daniel Borkmann
2019-04-30 12:45 ` [PATCH bpf 2/2] libbpf: proper XSKMAP cleanup Björn Töpel
2019-05-01  3:34   ` William Tu
2019-04-30 15:38 ` [PATCH bpf 0/2] libbpf: fixes for AF_XDP teardown Jonathan Lemon
2019-05-05  6:30   ` Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190430124536.7734-1-bjorn.topel@gmail.com \
    --to=bjorn.topel@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=magnus.karlsson@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=u9012063@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox