]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: Don't access tx_q->dirty_tx before netif_tx_lock
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 21 Oct 2017 06:51:30 +0000 (06:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 02:24:43 +0000 (03:24 +0100)
commit0441e77fef21d6d6212b412ad50ae92284f94db0
tree469d91c7c5ee7bf8343f193c6abf152d4a75de73
parent7f05c1286fc9db0cf1e98000168a9b1035c688b6
stmmac: Don't access tx_q->dirty_tx before netif_tx_lock

This is the possible reason for different hard to reproduce
problems on my ARMv7-SMP test system.

The symptoms are in recent kernels imprecise external aborts,
and in older kernels various kinds of network stalls and
unexpected page allocation failures.

My testing indicates that the trouble started between v4.5 and v4.6
and prevails up to v4.14.

Using the dirty_tx before acquiring the spin lock is clearly
wrong and was first introduced with v4.6.

Fixes: 38215f2affb5 ("stmmac: review RX/TX ring management")
Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c