🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21461

Re: [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp()

#21461
From: Lin Ma
Date: Tue, 24 Nov 2026 01:42
23 lines
9688 bytes
Hi,

Thanks for the review.  Both points are valid.

The High issue is correct: the new lower-bound check only covers the TLP
fast path, while the root cause is that rxrpc_transmit_fresh_data()
commits tx_qtail and tx_top before rxrpc_send_data_packet() has
succeeded.  If the wire header allocation fails, tx_transmitted lags
behind, and the next iteration can index a new segment with a stale seq;
the LAST-packet case can also leave the remaining range unsent.  I will
fix the tx window state update/rollback rather than only guarding one
consumer.

The Critical issue is also real: ACKALL rotates the Tx window and frees
txbuf slots up to tx_transmitted while tx_qtail still covers them, and it
does not update acks_hard_ack, so TLP can still select a freed slot even
with the new check.  I will cover that path as well, either by keeping
the Tx window state consistent on ACKALL or by making
rxrpc_retransmit_data() tolerate a missing txbuf, and will send a v2
series.

pw-bot: cr
Technical Details
Message-ID: <20261124014208.4145069-1-linma@zju.edu.cn>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369945-linux-kernel-netdev=dewy.ru
References: <20261122135515.3989708-1-linma@zju.edu.cn> <179544218224.3135.17101952241323509354@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369945-linux-kernel-netdev=dewy.ru
From: linma@zju.edu.cn (Lin Ma)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] rxrpc: Fix missing lower bound in rxrpc_resend_tlp()
Date: Tue, 24 Nov 2026 09:42:08 +0800
Organization: Usenet Network
Message-ID: <20261124014208.4145069-1-linma@zju.edu.cn>
References: <20261122135515.3989708-1-linma@zju.edu.cn> <179544218224.3135.17101952241323509354@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="4028544"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AZKc3hkeQol+YsiKKOkw3yn7ivQ= sha256:/MmVG4i2R5muTCWhQGuuq8PxYryzQJ8uv8r1KrCRLVA=
	sha1:2XqoHjP20mZm2q1U4Csm7FF+BT0= sha256:pcV7aoU9YBybKXRw+1UdmdUXyIQeKszosAR+wYxPyuQ=
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 D8EEF125DCA; Tue, 24 Nov 2026 04:43:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 lZoR6K8-wIh7;
	Tue, 24 Nov 2026 04:43:40 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369945-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=zju.edu.cn
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 78D07125DC8; Tue, 24 Nov 2026 04:43:35 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 13B4C33655; Tue, 24 Nov 2026 01:43:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795484605;
	b=fUiTzO9psm1irubpu5HZO7ggG4Ak4xgU2rFPFkrErVbh3Mx30KZcO0Mo6xSptU+7OHej
	 ln6Wpyq0q2HVnCqo4gxEN/EOA8y+EM2JYBc3RJLhy6dPsvhKokAshPXAEEpZrk0eB1GWC
	 j+wf6EZ0LPtnonm9NYlUkKTjRYHPHqtR1PvW8ORDA2PvSu97DJckLKwyKoVZ/3gbLRGQP
	 Om2O/9EIoVoKVoEx5M98gz/tS7sIQdQkJMzncoCcRpAsyg5L8Sy63f4ZK3i1tRr3QxUgR
	 V4HYilOsvNIRmdJ+Ncvj879kaG12I0TAbKtEGq3t/CJHmu377D+MXX1Aa6NBbzXcENw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795484605;
	h=X-Original-To:Received:DMARC-Filter:Received:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:X-CM-TRANSID:X-CM-SenderInfo:
	 X-CM-DELIVERINFO:X-Coremail-Antispam;
	bh=jrkyD4ckKisxzlyAtHxzTitUA1mJ/aXH0LLP9Ky9BdY=;
	b=qRhETaWl4+LpYxARnXxKtjwgD/XubCrMVsbxNQInGtTz4W7INUCElCzFzk3DTcYADirR
	 2SXBuUEL+ExzPIAk7Adv2rAGUZlE6Wj+S2RQ2tjdp+Qi64XRT+7yjs6SxsMRJm4SIY1ab
	 pppS+GGmBNchPPXfvEs6+SaAK7gOM6TBsShcdjuYxhrPn4XRu7s1WYjb2oMj1Gry5kh5k
	 YS/ZzAnmMWBEjwtttNwGgD35YAlaQ5k6R1ePhXSP+Fod8xS8iAeCOhl6BKVewhqrwK9Wd
	 KQJtK6RZGvCkxs9Z/CyLUAnIC11DH2U4558zy5CL3kPBD26gxFYeDtD/+p7NLVG3Z7Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=zju.edu.cn;
	spf=pass smtp.mailfrom=zju.edu.cn;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id B6EF9606A336;
	Tue, 24 Nov 2026 01:43:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=52.187.6.220
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795484605;
	b=jjE7riQsuJ1hp2wz8iB+40PtMn6SXtZh/PRk+iGNELTNCkG+pCjE81SrIklh1zr6xhYz
	 X61LOCn3Wqh+1F+m2aW/HaELW6TQ9b2LrQcofOkaExMBroYMHMfWdwcmtiS+AnzTPyB7d
	 iX+mR6jJcZNQSJi2ofejzzRY+fCoGxehKTPBVj4t6FF39nrBlLUPQzyhL6sK6+8YMn6xm
	 bD4+k9BmLwGqriwJfBPIA9LJbgyLmU+Z0qLEnkVPT5g8UUViAAyihCvZY7LB+LtjaFbxN
	 zI6J3YkUuSxgUWQ/SNKIKk/v+UH5NvtSBpMftUxV0U+uZr1ZWQ/9ZBkuUbNwcd3hUQQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795484605;
	h=DMARC-Filter:Received:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding:X-CM-TRANSID:X-CM-SenderInfo:
	 X-CM-DELIVERINFO:X-Coremail-Antispam;
	bh=jrkyD4ckKisxzlyAtHxzTitUA1mJ/aXH0LLP9Ky9BdY=;
	b=gxoZP4oSC+eJqxDO5mayFy9YoSPMA5WSLMTzDKIkN1C1wiPHNOxRQOrBLn9mExqwwVAX
	 4SLxXuEG9PoanemM3eQamCdMoj8IEAASGyywWwgXQGiso6roV01JOLr8aOJyli7TQEp1F
	 xFcB9VpBCpC4bNblstBF1iZkj3aTqq/n/IYtLtUj8BvSDalUrc6nCDeEYlJdIvRQTO7bA
	 gLoRzhIhB3lZsQ7HPDDzQwhl4Ed0+uexItxNYUT8bKDAUYUAaKeWi6Zpf4JQjblW2Bs6Z
	 inkErA5O1VVQf152K7t84YREyYe/8CUKIqRcEQ4+zVmxnkL2dOMhmVR7fdu9aiQP+uA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=zju.edu.cn;
	spf=pass smtp.mailfrom=zju.edu.cn;
	arc=none smtp.remote-ip=52.187.6.220
X-Received: from azure-sdnproxy.icoremail.net (azure-sdnproxy.icoremail.net [52.187.6.220])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5929E606A322;
	Tue, 24 Nov 2026 01:43:21 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5929E606A322
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zju.edu.cn
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zju.edu.cn
X-Received: from zju.edu.cn (unknown [123.60.231.41])
	by mtasvr (Coremail) with SMTP id _____wA3MH+n6wRrUrkvAg--.6271S3;
	Tue, 24 Nov 2026 09:43:04 +0800 (CST)
X-Received: from ubuntu2404-234226.. (unknown [123.60.231.41])
	by mail-app4 (Coremail) with UTF8SMTPSA id zi_KCgAnOaCi6wRrdtn0AA--.15511S4;
	Tue, 24 Nov 2026 09:42:59 +0800 (CST)
X-Cc: David Howells <dhowells@redhat.com>,
	Marc Dionne <marc.dionne@auristor.com>,
	netdev@vger.kernel.org,
	linux-afs@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Lin Ma <linma@zju.edu.cn>
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <179544218224.3135.17101952241323509354@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-CM-TRANSID: zi_KCgAnOaCi6wRrdtn0AA--.15511S4
X-CM-SenderInfo: qtrwiiyqvtljo62m3hxhgxhubq/1tbiAwAMEmryeh4flAA9sX
X-CM-DELIVERINFO: =?B?QZVQRwXKKxbFmtjJiESix3B1w3tPqcowV1L23Bze5QtIr9Db75bEBiiEybVhThS0pI
	APHnkvfpsecr7gZmVpD/pedGedjdVxmRfghIOn9fHVZS57XVpGu+XGS3B+/7X9ScIUU+Gl
	RlgHvBPCFfoGbpgiFIvf6+PTO2ODNQDeBCya8nctNquLKLixujjCyQ7sWCspgA==
X-Coremail-Antispam: 1Uk129KBj9xXoW7XF1DCw15tr1Dur1rAw1kJFc_yoWDXFX_Wa
	4Fk34qqw48XrW7Kwn09a1UurWSk3yUKr95JryrJr93Xa48ZFsxuF9YgrZY9w1kKrs8Krnx
	CwnYqayakw17XosvyTuYvTs0mTUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvT
	s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI
	cSsGvfJTRUUUbsxYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1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