Skip to contentSkip to conversation

tipc: fix bc_ackers underflow on duplicate GRP_ACK_MSG

PATCH Applied Oleh Konko 4 participants 4 messages Apr 2 – Apr 3

Subsystems (4)
lore
Share & tools
lore

Oleh Konko

author
#0 lore raw

PATCH v3 1/1 tipc: fix bc_ackers underflow on duplicate GRP_ACK_MSG

The GRP_ACK_MSG handler in tipc_group_proto_rcv() currently decrements bc_ackers on every inbound group ACK, even when the same member has already acknowledged the current broadcast round.

Because bc_ackers is a u16, a duplicate ACK received after the last legitimate ACK wraps the counter to 65535. Once wrapped, tipc_group_bc_cong() keeps reporting congestion and later group broadcasts on the affected socket stay blocked until the group is recreated.

Fix this by ignoring duplicate or stale ACKs before touching bc_acked or bc_ackers. This makes repeated GRP_ACK_MSG handling idempotent and prevents the underflow path.

Fixes 2f487712b893 ("tipc: guarantee that group broadcast doesn't bypass group unicast")

---
v3:
- correct the Fixes tag to the commit that introduced GRP_ACK_MSG and bc_ackers

v2:
- make duplicate or stale GRP_ACK_MSG a full no-op via early return
- place acked in reverse xmas tree style

 net/tipc/group.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
net/tipc/group.c +5 -1
index e0e6227b433..14e6732624e 100644
@@ -746,6 +746,7 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool *usr_wakeup,
 	u32 port = msg_origport(hdr);
 	struct tipc_member *m, *pm;
 	u16 remitted, in_flight;
+	u16 acked;
 
 	if (!grp)
 		return;
@@ -798,7 +799,10 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool *usr_wakeup,
 	case GRP_ACK_MSG:
 		if (!m)
 			return;
-		m->bc_acked = msg_grp_bc_acked(hdr);
+		acked = msg_grp_bc_acked(hdr);
+		if (less_eq(acked, m->bc_acked))
+			return;
+		m->bc_acked = acked;
 		if (--grp->bc_ackers)
 			return;
 		list_del_init(&m->small_win);
Signature · 1 line
2.50.0
maintainer Reviewed-by on v3 1/1
#1 lore raw
Quoted 58 lines

Subject: [PATCH net v3] tipc: fix bc_ackers underflow on duplicate GRP_ACK_MSG

The GRP_ACK_MSG handler in tipc_group_proto_rcv() currently decrements bc_ackers on every inbound group ACK, even when the same member has already acknowledged the current broadcast round.

Because bc_ackers is a u16, a duplicate ACK received after the last legitimate ACK wraps the counter to 65535. Once wrapped, tipc_group_bc_cong() keeps reporting congestion and later group broadcasts on the affected socket stay blocked until the group is recreated.

Fix this by ignoring duplicate or stale ACKs before touching bc_acked or bc_ackers. This makes repeated GRP_ACK_MSG handling idempotent and prevents the underflow path.

Fixes 2f487712b893 ("tipc: guarantee that group broadcast doesn't bypass

group unicast")

---
v3:
- correct the Fixes tag to the commit that introduced GRP_ACK_MSG and bc_ackers

v2:
- make duplicate or stale GRP_ACK_MSG a full no-op via early return
- place acked in reverse xmas tree style

net/tipc/group.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
net/tipc/group.c index renamed from net/tipc/group.c +0 -0

e0e6227b433..14e6732624e 100644

net/tipc/group.c +1 -0
@@ -746,6 +746,7 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool
 *usr_wakeup,
 	u32 port = msg_origport(hdr);
 	struct tipc_member *m, *pm;
 	u16 remitted, in_flight;
+	u16 acked;
 
 	if (!grp)
		return;
net/tipc/group.c +4 -1
@@ -798,7 +799,10 @@ void tipc_group_proto_rcv(struct tipc_group *grp,
 bool *usr_wakeup,
 	case GRP_ACK_MSG:
 		if (!m)
 			return;
-		m->bc_acked = msg_grp_bc_acked(hdr);
+		acked = msg_grp_bc_acked(hdr);
+		if (less_eq(acked, m->bc_acked))
+			return;
+		m->bc_acked = acked;
 		if (--grp->bc_ackers)
 			return;
		list_del_init(&m->small_win);
Quoted 2 lines

--
2.50.0

reviewer Reviewed-by on v3 1/1
#2 lore raw
In reply to Oleh Konko
Quoted 17 lines · Oleh Konko

The GRP_ACK_MSG handler in tipc_group_proto_rcv() currently decrements bc_ackers on every inbound group ACK, even when the same member has already acknowledged the current broadcast round.

Because bc_ackers is a u16, a duplicate ACK received after the last legitimate ACK wraps the counter to 65535. Once wrapped, tipc_group_bc_cong() keeps reporting congestion and later group broadcasts on the affected socket stay blocked until the group is recreated.

Fix this by ignoring duplicate or stale ACKs before touching bc_acked or bc_ackers. This makes repeated GRP_ACK_MSG handling idempotent and prevents the underflow path.

Fixes 2f487712b893 ("tipc: guarantee that group broadcast doesn't bypass group unicast")
Quoted 7 lines

---
v3:
- correct the Fixes tag to the commit that introduced GRP_ACK_MSG and bc_ackers

v2:
- make duplicate or stale GRP_ACK_MSG a full no-op via early return
- place acked in reverse xmas tree style

#3 lore raw
In reply to Oleh Konko
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Thu, 2 Apr 2026 09:48:57 +0000 you wrote:

The GRP_ACK_MSG handler in tipc_group_proto_rcv() currently decrements bc_ackers on every inbound group ACK, even when the same member has already acknowledged the current broadcast round.

Because bc_ackers is a u16, a duplicate ACK received after the last legitimate ACK wraps the counter to 65535. Once wrapped, tipc_group_bc_cong() keeps reporting congestion and later group broadcasts on the affected socket stay blocked until the group is recreated.

[...]

Here is the summary with links:
- [net,v3] tipc: fix bc_ackers underflow on duplicate GRP_ACK_MSG

    https://git.kernel.org/netdev/net/c/48a5fe38772b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html