Revision b5b6ff730253ab68ec230e239c4245cb1e8a5397 authored by Alexei Starovoitov on 02 May 2018, 22:30:45 UTC, committed by Alexei Starovoitov on 02 May 2018, 22:30:46 UTC
John Fastabend says: ==================== When I added the test_sockmap to selftests I mistakenly changed the test logic a bit. The result of this was on redirect cases we ended up choosing the wrong sock from the BPF program and ended up sending to a socket that had no receive handler. The result was the actual receive handler, running on a different socket, is timing out and closing the socket. This results in errors (-EPIPE to be specific) on the sending side. Typically happening if the sender does not complete the send before the receive side times out. So depending on timing and the size of the send we may get errors. This exposed some bugs in the sockmap error path handling. This series fixes the errors. The primary issue is we did not do proper memory accounting in these cases which resulted in missing a sk_mem_uncharge(). This happened in the redirect path and in one case on the normal send path. See the three patches for the details. The other take-away from this is we need to fix the test_sockmap and also add more negative test cases. That will happen in bpf-next. Finally, I tested this using the existing test_sockmap program, the older sockmap sample test script, and a few real use cases with Cilium. All of these seem to be in working correctly. v2: fix compiler warning, drop iterator variable 'i' that is no longer used in patch 3. ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.3 KB |
Makefile | -rw-r--r-- | 391 bytes |
xfrm_algo.c | -rw-r--r-- | 14.2 KB |
xfrm_device.c | -rw-r--r-- | 7.6 KB |
xfrm_hash.c | -rw-r--r-- | 802 bytes |
xfrm_hash.h | -rw-r--r-- | 4.5 KB |
xfrm_input.c | -rw-r--r-- | 12.6 KB |
xfrm_ipcomp.c | -rw-r--r-- | 7.6 KB |
xfrm_output.c | -rw-r--r-- | 6.1 KB |
xfrm_policy.c | -rw-r--r-- | 77.7 KB |
xfrm_proc.c | -rw-r--r-- | 3.3 KB |
xfrm_replay.c | -rw-r--r-- | 18.1 KB |
xfrm_state.c | -rw-r--r-- | 59.8 KB |
xfrm_sysctl.c | -rw-r--r-- | 1.9 KB |
xfrm_user.c | -rw-r--r-- | 76.2 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...