diff options
author | Yoshihiro Shimoda <[email protected]> | 2020-07-21 15:23:12 +0900 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-07-21 15:34:07 -0700 |
commit | 015c5d5e6aa3523c758a70eb87b291cece2dbbb4 (patch) | |
tree | 4e7fca94fa67c33bd4f7198030e0ab11abc56f3a /lib/mpi/mpi-cmp.c | |
parent | ca673235523019ac58dda5287d9c819e19702860 (diff) |
net: ethernet: ravb: exit if re-initialization fails in tx timeout
According to the report of [1], this driver is possible to cause
the following error in ravb_tx_timeout_work().
ravb e6800000.ethernet ethernet: failed to switch device to config mode
This error means that the hardware could not change the state
from "Operation" to "Configuration" while some tx and/or rx queue
are operating. After that, ravb_config() in ravb_dmac_init() will fail,
and then any descriptors will be not allocaled anymore so that NULL
pointer dereference happens after that on ravb_start_xmit().
To fix the issue, the ravb_tx_timeout_work() should check
the return values of ravb_stop_dma() and ravb_dmac_init().
If ravb_stop_dma() fails, ravb_tx_timeout_work() re-enables TX and RX
and just exits. If ravb_dmac_init() fails, just exits.
[1]
https://lore.kernel.org/linux-renesas-soc/[email protected]/
Reported-by: Dirk Behme <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Sergei Shtylyov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions