summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-04-03 21:55:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2025-04-03 21:55:41 +0300
commit531a62f223d2f4c0d01df3b3387f0836b5006256 (patch)
treec303403835e7357028ba747f86a3ac496086c939 /net
parent5a2b5cb76cb4c3e878d25f92801df9e12a7b2037 (diff)
parent3f8ad18f81841a9ce70f603c45d5a278528c67e6 (diff)
downloadlinux-531a62f223d2f4c0d01df3b3387f0836b5006256.tar.xz
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Pull bpf fixes from Alexei Starovoitov: - Fix BPF selftests expectations of assembler output and struct layout (Song Liu and Yonghong Song) - Fix XSK error code when queue is full (Wang Liang) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Fix verifier_private_stack test failure selftests/bpf: Fix verifier_bpf_fastcall test selftests/bpf: Fix tests after fields reorder in struct file xsk: Fix __xsk_generic_xmit() error code when cq is full
Diffstat (limited to 'net')
-rw-r--r--net/xdp/xsk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index e5d104ce7b82..5696af45bcf7 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -806,8 +806,11 @@ static int __xsk_generic_xmit(struct sock *sk)
* if there is space in it. This avoids having to implement
* any buffering in the Tx path.
*/
- if (xsk_cq_reserve_addr_locked(xs->pool, desc.addr))
+ err = xsk_cq_reserve_addr_locked(xs->pool, desc.addr);
+ if (err) {
+ err = -EAGAIN;
goto out;
+ }
skb = xsk_build_skb(xs, &desc);
if (IS_ERR(skb)) {