net: ethernet: mtk_ppe: add RCU lock around dev_fill_forward_path
authorQingfang Deng <dqfext@gmail.com>
Thu, 14 Aug 2025 01:25:57 +0000 (09:25 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 Aug 2025 09:25:32 +0000 (11:25 +0200)
Ensure ndo_fill_forward_path() is called with RCU lock held.

Fixes: 2830e314778d ("net: ethernet: mtk-ppe: fix traffic offload with bridged wlan")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://patch.msgid.link/20250814012559.3705-1-dqfext@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mediatek/mtk_ppe_offload.c

index c855fb799ce1456fda12b43011e48ea0647c0804..e9bd32741983793783f64e9df254bb90e20abb8a 100644 (file)
@@ -101,7 +101,9 @@ mtk_flow_get_wdma_info(struct net_device *dev, const u8 *addr, struct mtk_wdma_i
        if (!IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED))
                return -1;
 
+       rcu_read_lock();
        err = dev_fill_forward_path(dev, addr, &stack);
+       rcu_read_unlock();
        if (err)
                return err;