Thread (3 messages) flat view 3 messages, 2 authors, 23d ago

Re: [PATCH net v2] bonding: fix u32 overflow in compute_gap()

From: Jay Vosburgh <jv@jvosburgh.net>
Date: 2026-08-17 15:26:39
Also in: lkml

Hangbin Liu [off-list ref] wrote:
Hi Jay,
On Fri, Aug 14, 2026 at 01:39:23PM +0800, Hangbin Liu wrote:
[...]
quoted
 struct alb_bond_info {
 	struct tlb_client_info	*tx_hashtbl; /* Dynamically allocated */
-	u32			unbalanced_load;
+	s64			unbalanced_load;
 	atomic_t		tx_rebalance_counter;
 	int			lp_counter;
 	/* -------- rlb parameters -------- */
Sashiko reported that on a 32-bit system, these s64 numbers' read/write
operations and division will tear. We need to use div_s64() for divisions
and may also need to convert the number to atomic64_t for read/write operations.

Do you know how bonding support works on a 32-bit system? Should we handle it?
	Bonding should function correctly on a 32 bit system for as long
as the base kernel continues to support 32 bit builds.

	-J

---
	-Jay Vosburgh, jv@jvosburgh.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help