mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
[Description]
Fix refcount underflow issue in the pending_work. If one of the Ethernet interface is down, the pending_work should not call to mtk_stop() function again to avoid a refcount underflow. Without this patch, the ETH may experience the kernel panic which caused by a refcount underflow. [Release-log] N/A Change-Id: I4e1f40640c09372cddad57994da03f70107f133a Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8324564
This commit is contained in:
parent
e45c4d4371
commit
e66d976488
@ -3088,7 +3088,7 @@ static void mtk_pending_work(struct work_struct *work)
|
||||
pr_info("[%s] mtk_stop starts !\n", __func__);
|
||||
/* stop all devices to make sure that dma is properly shut down */
|
||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||
if (!eth->netdev[i])
|
||||
if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
|
||||
continue;
|
||||
mtk_stop(eth->netdev[i]);
|
||||
__set_bit(i, &restart);
|
||||
|
Loading…
x
Reference in New Issue
Block a user