Re: [PATCH net v2] bonding: fix u32 overflow in compute_gap()
Jay Vosburgh <[email protected]>
| Newsgroups | gmane.linux.network,gmane.linux.kernel |
|---|---|
| Message-ID | <4137413.1786980396@famine> |
Hangbin Liu <[email protected]> wrote: >Hi Jay, >On Fri, Aug 14, 2026 at 01:39:23PM +0800, Hangbin Liu wrote: [...] >> 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, [email protected]