summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2021-09-07 20:29:40 +0900
committerDavid S. Miller <davem@davemloft.net>2021-09-07 14:02:02 +0100
commit0341d5e3d1ee2a36dd5a49b5bef2ce4ad1cfa6b4 (patch)
tree053272b5cf133ddfdff5167a8b951b1c1c5cdb90 /net
parentbbef56d861f103058e387ad5354b4083b9892a7c (diff)
downloadlinux-0341d5e3d1ee2a36dd5a49b5bef2ce4ad1cfa6b4.tar.gz
linux-0341d5e3d1ee2a36dd5a49b5bef2ce4ad1cfa6b4.tar.bz2
linux-0341d5e3d1ee2a36dd5a49b5bef2ce4ad1cfa6b4.zip
net: renesas: sh_eth: Fix freeing wrong tx descriptor
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: 86a74ff21a7a ("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>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions