openwrtv3/target/linux/mediatek/patches-4.9/0062-mdio-atomic.patch
Stijn Tintel d5b7215e31 kernel: update 4.9 to 4.9.49
Refresh patches.
Compile-tested on octeon and x86/64.
Runtime-tested on octeon and x86/64.

Fixes CVE-2017-11600.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-11 01:56:14 +02:00

14 lines
386 B
Diff

--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -97,7 +97,10 @@ static int mtk_mdio_busy_wait(struct mtk
return 0;
if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT))
break;
- usleep_range(10, 20);
+ if (in_atomic())
+ udelay(10);
+ else
+ usleep_range(10, 20);
}
dev_err(eth->dev, "mdio: MDIO timeout\n");