Article View: linux.kernel.netdev
Article #2430[PATCH] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
From: Dmitry Antipov
Date: Mon, 12 Oct 2026 16:36
Date: Mon, 12 Oct 2026 16:36
26 lines
6442 bytes
6442 bytes
In tcp_bpf_sendmsg(), propagate error code possibly returned
by sk_msg_memcopy_from_iter() so that the former can handle
it properly at 'out_err' label.
Assisted-by: Sashiko:[unknown LLM model]
Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
net/ipv4/tcp_bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
index 2e234d155b5e..0ce583f68d3b 100644
--- a/net/ipv4/tcp_bpf.c
+++ b/net/ipv4/tcp_bpf.c
@@ -581,6 +581,7 @@ static int tcp_bpf_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
copy);
if (ret < 0) {
sk_msg_trim(sk, msg_tx, osize);
+ err = ret;
goto out_err;
}
--
2.56.0
Technical Details
Message-ID:
<20261012163619.47528-1-dmantipov@yandex.ru>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345111-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345111-linux-kernel-netdev=dewy.ru From: dmantipov@yandex.ru (Dmitry Antipov) Newsgroups: linux.kernel.netdev Subject: [PATCH] tcp_bpf: propagate error code in tcp_bpf_sendmsg() Date: Mon, 12 Oct 2026 19:36:19 +0300 Organization: Usenet Network Message-ID: <20261012163619.47528-1-dmantipov@yandex.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1827900"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:rCEYRWFfLA6Tpv8hpd/1lKyIegw= sha256:RsEJu/AMlymy8EXkggOY6qNo5lBVUF1cMnSF3RK78zU= sha1:A4gBIgwznB3osehJfsm96PYfy2c= sha256:zX3FBLc5efr0CBNsUndBF/Brlcu5gkmH89WYdT+8aXY= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C752710FC62; Mon, 12 Oct 2026 19:46:06 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.748 X-Spam-Status: No, score=-0.748 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=yandex.ru X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QvLxg4-eI6do; Mon, 12 Oct 2026 19:46:03 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-345111-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=yandex.ru X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id E38E610FC23; Mon, 12 Oct 2026 19:45:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 95353293AA; Mon, 12 Oct 2026 16:37:12 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24C254AE8C2; Mon, 12 Oct 2026 16:37:11 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b="UsRF0GcZ" X-Received: from forward103d.mail.yandex.net (forward103d.mail.yandex.net [51.250.60.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 509C44AEBD0; Mon, 12 Oct 2026 16:37:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.250.60.163 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791823031; cv=none; b=TmD8KpjzaYyPvQAcCrII5WO3d4C47/dQgGgxTx5RheH/20qKHOxyGbSq/JbYvz0m8mgheiUZ1iCFEjRxoAy3Se+e4KXB/LijHWZY3OLk0BEBqF7Alyb4vCkv3LjwigAI17ssSG/7gsTjfVxORbHOgz0Ss6a36mF0i8EIIyamS3U= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791823031; c=relaxed/simple; bh=I1Au5zhhfk6ewU53/8hAATSVq5eIS+XKJOmB/K0YuhM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j6pajLbTqTXCAS3t4CvD5SstpAG4yWtwmm7k12SDykKik4zt7LegwuDSIJW+/DGX/+ClfEpzezLjrBZD35WeWSAWHn0+KlTqru/50XH26Fre+5ql9izAlSHRL28jb1mFA6+LNDCVaFOi6+iOF3uqj/uX6I4ahC1bjIeYEmank5U= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru; spf=pass smtp.mailfrom=yandex.ru; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b=UsRF0GcZ; arc=none smtp.client-ip=51.250.60.163 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex.ru X-Received: from mail-nwsmtp-smtp-production-main-58.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-58.klg.yp-c.yandex.net [IPv6:2a02:6b8:c43:4705:0:640:c883:0]) by forward103d.mail.yandex.net (postfix) with ESMTPS id 37866C0085; Mon, 12 Oct 2026 19:36:57 +0300 (MSK) X-Received: by mail-nwsmtp-smtp-production-main-58.klg.yp-c.yandex.net (smtp) with ESMTPSA id taVr5f3kgSw0-a9FsvWSj; Mon, 12 Oct 2026 19:36:56 +0300 X-Yandex-Fwd: 1 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1791823016; bh=i7tETMhSgGfka1qBHQyR0LY4YrOyLrdsyCX+E7J0BzU=; h=Message-ID:Date:Cc:Subject:To:From; b=UsRF0GcZPCaJwSiPC47NYO/M9YIUNcIFKFUJo69jwkeu7QH/sCugexIyGcIgJxBZ7 v/46IfafjgogJABMgG+U+QyG4E1f8pzxNMFJ9Nz0llcvBiqF+M2xGtyoc8mtIZX9/P YxBlETq4oOxqeK2MlGz4QIIUyFzpCCosqcnnXZMk= X-Authentication-Results: mail-nwsmtp-smtp-production-main-58.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru X-Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, lvc-project@linuxtesting.org, Dmitry Antipov <dmantipov@yandex.ru> X-Mailer: git-send-email 2.56.0 X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>