lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 16 Mar 2018 11:17:41 -0400 (EDT) From: David Miller <davem@...hat.com> To: f.fainelli@...il.com Cc: netdev@...r.kernel.org Subject: Re: [PATCH net] net: systemport: Rewrite __bcm_sysport_tx_reclaim() From: Florian Fainelli <f.fainelli@...il.com> Date: Tue, 13 Mar 2018 14:45:07 -0700 > There is no need for complex checking between the last consumed index > and current consumed index, a simple subtraction will do. > > This also eliminates the possibility of a permanent transmit queue stall > under the following conditions: > > - one CPU bursts ring->size worth of traffic (up to 256 buffers), to the > point where we run out of free descriptors, so we stop the transmit > queue at the end of bcm_sysport_xmit() > > - because of our locking, we have the transmit process disable > interrupts which means we can be blocking the TX reclamation process > > - when TX reclamation finally runs, we will be computing the difference > between ring->c_index (last consumed index by SW) and what the HW > reports through its register > > - this register is masked with (ring->size - 1) = 0xff, which will lead > to stripping the upper bits of the index (register is 16-bits wide) > > - we will be computing last_tx_cn as 0, which means there is no work to > be done, and we never wake-up the transmit queue, leaving it > permanently disabled > > A practical example is e.g: ring->c_index aka last_c_index = 12, we > pushed 256 entries, HW consumer index = 268, we mask it with 0xff = 12, > so last_tx_cn == 0, nothing happens. > > Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") > Signed-off-by: Florian Fainelli <f.fainelli@...il.com> Indeed if you mask the indexes too early this can happen. Applied and queued up for -stable, thanks Florian.
Powered by blists - more mailing lists