From: John Fastabend <john.fastabend@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net
Cc: netdev@vger.kernel.org
Subject: [RFC PATCH] bpf: test case for kcm + sockmap
Date: Thu, 30 Aug 2018 15:39:47 -0700 [thread overview]
Message-ID: <20180830223555.11553.24093.stgit@john-Precision-Tower-5810> (raw)
This finds the issue with kcm and sockmap where when a kcm socket is
added to a sockmap we fail to notice it is a kcm sock and not a tcp
bpf ULP sock. This results in a refcount_inc_not_zero() being called
on the psock which is assigned to a smap_psock incorrectly. On my
system it just happens to fail there and returns EAGAIN.
With the fix, just submitted for bpf tree, we get the correct EBUSY
error.
https://patchwork.ozlabs.org/project/netdev/list/?series=63393
RFC for now and will submit properly when bpf fix makes its way into
bpf-next. But, wanted to get the test on the list for folks to look
at.
---
John Fastabend (1):
bpf: test_maps add a test to catch kcm + sockmap
tools/testing/selftests/bpf/Makefile | 2 -
tools/testing/selftests/bpf/test_maps.c | 64 ++++++++++++++++++++++++++++++-
2 files changed, 63 insertions(+), 3 deletions(-)
next reply other threads:[~2018-08-31 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 22:39 John Fastabend [this message]
2018-08-30 22:39 ` [RFC PATCH] bpf: test_maps add a test to catch kcm + sockmap John Fastabend
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=20180830223555.11553.24093.stgit@john-Precision-Tower-5810 \
--to=john.fastabend@gmail.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/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