From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 20185388E4E; Thu, 2 Jul 2026 16:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009413; cv=none; b=k8lQa/aYtK0oSPVVnGrW/3/LA5E+l3jt3u4mbE/okIBpN4fxN/ZQDp9L9Fcl0soOTmI89aIxIGDgABo3RtloxrdA4/G1wmtenb6+Ug1U5uwb6ub/kITHOS6gh8BcQGWubZA/XXZjPO5ejZEfwKDw1/xZZl/iFzbu8q0W6RdRQZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009413; c=relaxed/simple; bh=yYqiGY0LIGl4daXsQgc1B1Wv/2UI7Q6WALo9QR9d7Sw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nB6UpOMK74xiZE8x9gTSwM2PLyVYgfo5g6b8xueIB2pGuCmT068XLPnLS3ukYYmYUrID3yOhyaGLGYEC8EBIB+XyHWgf2e9waavniWw/URbopXijK7zZSBcfeq/l0o/t6B6ENoPt1JgXTMWewhpOkPVAqx3MrrHseS7EMG0AALM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=o9RttTdY; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="o9RttTdY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9B751F00A3D; Thu, 2 Jul 2026 16:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783009408; bh=VwRdiKPycEzHyuu4mMvNTmif6vZxd6+xJ0y4v2W2LKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=o9RttTdY+9pcc/CrE4fMO33IMjYXF2TLxLX1f7eAH/zJppIgoBo2klTk+2EzxNkf5 VFRaGe1keQXexb8j7u0EtyIlb+IFwOeTtGXU+GHLkmaUpztjC1PHl4ml8WGi6vt1rL 8dk+tNCjJci9Kxr+Uj1tK0cAE13O8blroAieLlJs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Sven Eckelmann , Sasha Levin Subject: [PATCH 5.10 39/96] batman-adv: tp_meter: fix fast recovery precondition Date: Thu, 2 Jul 2026 18:19:31 +0200 Message-ID: <20260702155109.807354872@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155108.949633242@linuxfoundation.org> References: <20260702155108.949633242@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sven Eckelmann commit 2b0d08f08ed3b2174f05c43089ec65f3543a025b upstream. The fast recovery precondition checks if the recover (initialized to BATADV_TP_FIRST_SEQ) is bigger than the received ack. But since recover is only updated when this check is successful, it will never enter the fast recovery mode. According to RFC6582 Section 3.2 step 2, the check should actually be different: > When the third duplicate ACK is received, the TCP sender first > checks the value of recover to see if the Cumulative > Acknowledgment field covers more than recover The precondition must therefore check if recover is smaller than the received ack - basically swapping the operands of the current check. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann Signed-off-by: Sasha Levin --- net/batman-adv/tp_meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 118cb5dd285c2d..cd196842478686 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -738,7 +738,7 @@ static void batadv_tp_recv_ack(struct batadv_priv *bat_priv, if (atomic_read(&tp_vars->dup_acks) != 3) goto out; - if (recv_ack >= tp_vars->recover) + if (tp_vars->recover >= recv_ack) goto out; /* if this is the third duplicate ACK do Fast Retransmit */ -- 2.53.0