summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-07-03 04:37:12 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-07-03 04:37:12 +0300
commit39d393cf209697babc53f8b29e6aecd6acd8509e (patch)
treee8ab093eacf899194e27a120f8ede438ca3fece3 /include
parentd0fbad0aec1df29717fab736eb24c8a49cf2c70b (diff)
parenta9744f7ca200c756e6f8c65b633770a2da711651 (diff)
downloadlinux-39d393cf209697babc53f8b29e6aecd6acd8509e.tar.xz
Merge branch 'af_xdp-fixes'
Magnus Karlsson says: ==================== This patch set fixes three bugs in the SKB TX path of AF_XDP. Details in the individual commits. The structure of the patch set is as follows: Patch 1: Fix for lost completion message Patch 2-3: Fix for possible multiple completions of single packet Patch 4: Fix potential race during error Changes from v1: * Added explanation of race in commit message of patch 4. ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/xdp_sock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index 9fe472f2ac95..7161856bcf9c 100644
--- a/include/net/xdp_sock.h
+++ b/include/net/xdp_sock.h
@@ -60,6 +60,10 @@ struct xdp_sock {
bool zc;
/* Protects multiple processes in the control path */
struct mutex mutex;
+ /* Mutual exclusion of NAPI TX thread and sendmsg error paths
+ * in the SKB destructor callback.
+ */
+ spinlock_t tx_completion_lock;
u64 rx_dropped;
};