diff options
author | Roger Quadros <rogerq@kernel.org> | 2025-01-17 17:06:33 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-01-21 01:57:26 +0300 |
commit | 681eb2beb3efe21e630bcc4881595e3b42dd7948 (patch) | |
tree | de6a67b62b8d53a871750cb08b638387bc28b852 /scripts/extract-fwblobs | |
parent | b115243ab8bd92387cf524ba3a7d81eda8eca885 (diff) | |
download | linux-681eb2beb3efe21e630bcc4881595e3b42dd7948.tar.xz |
net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path
We are missing netif_napi_del() and am65_cpsw_nuss_free_tx/rx_chns()
in error path when am65_cpsw_nuss_init_tx/rx_chns() is used anywhere
other than at probe(). i.e. am65_cpsw_nuss_update_tx_rx_chns and
am65_cpsw_nuss_resume()
As reported, in am65_cpsw_nuss_update_tx_rx_chns(),
if am65_cpsw_nuss_init_tx_chns() partially fails then
devm_add_action(dev, am65_cpsw_nuss_free_tx_chns,..) is added
but the cleanup via am65_cpsw_nuss_free_tx_chns() will not run.
Same issue exists for am65_cpsw_nuss_init_tx/rx_chns() failures
in am65_cpsw_nuss_resume() as well.
This would otherwise require more instances of devm_add/remove_action
and is clearly more of a distraction than any benefit.
So, drop devm_add/remove_action for am65_cpsw_nuss_free_tx/rx_chns()
and call am65_cpsw_nuss_free_tx/rx_chns() and netif_napi_del()
where required.
Reported-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Closes: https://lore.kernel.org/all/m4rhkzcr7dlylxr54udyt6lal5s2q4krrvmyay6gzgzhcu4q2c@r34snfumzqxy/
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://patch.msgid.link/20250117-am65-cpsw-streamline-v2-1-91a29c97e569@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions