]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: airoha: add RCU lock around dev_fill_forward_path
authorQingfang Deng <dqfext@gmail.com>
Fri, 20 Mar 2026 09:43:15 +0000 (17:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Mar 2026 00:45:40 +0000 (17:45 -0700)
Since 0417adf367a0 ("ppp: fix race conditions in ppp_fill_forward_path")
dev_fill_forward_path() should be called with RCU read lock held. This
fix was applied to net, while the Airoha flowtable commit was applied to
net-next, so it hadn't been an issue until net was merged into net-next.

Fixes: a8bdd935d1dd ("net: airoha: Add wlan flowtable TX offload")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260320094315.525126-1-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_ppe.c

index 42dbe8f93231e849f37f501882598cc264aefb95..5724f8f2defd51fd40a81a40491ce9db3119451e 100644 (file)
@@ -227,7 +227,9 @@ static int airoha_ppe_get_wdma_info(struct net_device *dev, const u8 *addr,
        if (!dev)
                return -ENODEV;
 
+       rcu_read_lock();
        err = dev_fill_forward_path(dev, addr, &stack);
+       rcu_read_unlock();
        if (err)
                return err;