
Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC991N ------------------------------------------------- Fix the kabi broken introduced in commit a1356ac7749c ("xsk: Fix race condition in AF_XDP generic RX path"). Fixes: a1356ac7749c ("xsk: Fix race condition in AF_XDP generic RX path") Signed-off-by: Wang Liang <wangliang74@huawei.com> --- include/net/xdp_sock.h | 2 ++ include/net/xsk_buff_pool.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h index 69c9449284e0..6492a7f523cd 100644 --- a/include/net/xdp_sock.h +++ b/include/net/xdp_sock.h @@ -63,6 +63,8 @@ struct xdp_sock { struct xsk_queue *tx ____cacheline_aligned_in_smp; struct list_head tx_list; + /* Reserved for kabi consistency. */ + spinlock_t rx_lock; /* Statistics */ u64 rx_dropped; diff --git a/include/net/xsk_buff_pool.h b/include/net/xsk_buff_pool.h index 8e8af6538a59..cb5b41a35433 100644 --- a/include/net/xsk_buff_pool.h +++ b/include/net/xsk_buff_pool.h @@ -55,13 +55,14 @@ struct xsk_buff_pool { refcount_t users; struct xdp_umem *umem; struct work_struct work; - /* Protects generic receive in shared and non-shared umem mode. */ - spinlock_t rx_lock; struct list_head free_list; struct list_head xskb_list; u32 heads_cnt; u16 queue_id; + /* Protects generic receive in shared and non-shared umem mode. */ + KABI_FILL_HOLE(spinlock_t rx_lock) + /* Data path members as close to free_heads at the end as possible. */ struct xsk_queue *fq ____cacheline_aligned_in_smp; struct xsk_queue *cq; -- 2.33.0