netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/2] bpf, sockmap fixes
@ 2021-04-01 21:59 John Fastabend
  2021-04-01 22:00 ` [PATCH bpf v2 1/2] bpf, sockmap: fix sk->prot unhash op reset John Fastabend
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: John Fastabend @ 2021-04-01 21:59 UTC (permalink / raw)
  To: xiyou.wangcong, andrii.nakryiko, daniel, ast
  Cc: john.fastabend, bpf, netdev, lmb

This addresses an issue found while reviewing latest round of sock
map patches and an issue reported from CI via Andrii. After this
CI ./test_maps is stable for me.

The CI discovered issue was introduced by over correcting our
previously broken memory accounting. After the fix, "bpf, sockmap:
Avoid returning unneeded EAGAIN when redirecting to self" we fixed
a dropped packet and a missing fwd_alloc calculations, but pushed
it too far back into the packet pipeline creating an issue in the
unlikely case socket tear down happens with an enqueued skb. See
patch for details.

Tested with usual suspects: test_sockmap, test_maps, test_progs
and test_progs-no_alu32.

v2: drop skb_orphan its not necessary and use sk directly instead
    of using psock->sk both suggested by Cong

---

John Fastabend (2):
      bpf, sockmap: fix sk->prot unhash op reset
      bpf, sockmap: fix incorrect fwd_alloc accounting


 net/core/skmsg.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

--


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-05 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 21:59 [PATCH bpf v2 0/2] bpf, sockmap fixes John Fastabend
2021-04-01 22:00 ` [PATCH bpf v2 1/2] bpf, sockmap: fix sk->prot unhash op reset John Fastabend
2021-04-01 22:00 ` [PATCH bpf v2 2/2] bpf, sockmap: fix incorrect fwd_alloc accounting John Fastabend
2021-04-06 23:40 ` [PATCH bpf v2 0/2] bpf, sockmap fixes patchwork-bot+netdevbpf
2021-05-05 18:26 ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).