Files
linux/drivers
Yoshihiro Shimoda 044e7097e8 net: renesas: sh_eth: Fix freeing wrong tx descriptor
[ Upstream commit 0341d5e3d1 ]

The cur_tx counter must be incremented after TACT bit of
txdesc->status was set. However, a CPU is possible to reorder
instructions and/or memory accesses between cur_tx and
txdesc->status. And then, if TX interrupt happened at such a
timing, the sh_eth_tx_free() may free the descriptor wrongly.
So, add wmb() before cur_tx++.
Otherwise NETDEV WATCHDOG timeout is possible to happen.

Fixes: 86a74ff21a ("net: sh_eth: add support for Renesas SuperH Ethernet")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 11:48:14 +02:00
..
2020-09-09 19:04:23 +02:00
2021-07-20 16:15:55 +02:00
2021-09-22 11:48:10 +02:00
2021-09-22 11:47:54 +02:00
2019-05-14 19:17:53 +02:00
2021-01-17 14:04:22 +01:00
2020-12-30 11:26:04 +01:00
2021-08-26 08:36:46 -04:00
2019-07-26 09:14:05 +02:00
2021-09-22 11:47:51 +02:00
2020-02-24 08:34:47 +01:00