[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140913.171746.547311064738045536.davem@davemloft.net>
Date: Sat, 13 Sep 2014 17:17:46 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: nikolay@...hat.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, andy@...yhouse.net,
j.vosburgh@...il.com, vfalico@...il.com
Subject: Re: [PATCH net v2] bonding: fix div by zero while enslaving and
transmitting
From: Nikolay Aleksandrov <nikolay@...hat.com>
Date: Fri, 12 Sep 2014 17:38:18 +0200
> The problem is that the slave is first linked and slave_cnt is
> incremented afterwards leading to a div by zero in the modes that use it
> as a modulus. What happens is that in bond_start_xmit()
> bond_has_slaves() is used to evaluate further transmission and it becomes
> true after the slave is linked in, but when slave_cnt is used in the xmit
> path it is still 0, so fetch it once and transmit based on that. Since
> it is used only in round-robin and XOR modes, the fix is only for them.
> Thanks to Eric Dumazet for pointing out the fault in my first try to fix
> this.
...
> Fixes: 278b208375 ("bonding: initial RCU conversion")
> Signed-off-by: Nikolay Aleksandrov <nikolay@...hat.com>
> ---
> v2: Based on Eric's feedback change the fix to fetch the value once in a
> local variable in the affected modes and to act based on that.
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists