Message ID | 20200418181457.3193175-1-maz@kernel.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | f0212a5ebfa6cd789ab47666b9cc169e6e688732 |
Headers | show |
Series | net: stmmac: dwmac-meson8b: Add missing boundary to RGMII TX clock array | expand |
Hi Marc, On Sat, Apr 18, 2020 at 8:15 PM Marc Zyngier <maz@kernel.org> wrote: [...] > Digging into this indeed shows that the clock divider array is > lacking a final fence, and that the clock subsystems goes in the > weeds. Oh well. > > Let's add the empty structure that indicates the end of the array. oh. Thank you for fixing this! > Fixes: bd6f48546b9c ("net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs") > Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
From: Marc Zyngier <maz@kernel.org> Date: Sat, 18 Apr 2020 19:14:57 +0100 > Running with KASAN on a VIM3L systems leads to the following splat > when probing the Ethernet device: > > ================================================================== > BUG: KASAN: global-out-of-bounds in _get_maxdiv+0x74/0xd8 > Read of size 4 at addr ffffa000090615f4 by task systemd-udevd/139 > CPU: 1 PID: 139 Comm: systemd-udevd Tainted: G E 5.7.0-rc1-00101-g8624b7577b9c #781 > Hardware name: amlogic w400/w400, BIOS 2020.01-rc5 03/12/2020 ... > Digging into this indeed shows that the clock divider array is > lacking a final fence, and that the clock subsystems goes in the > weeds. Oh well. > > Let's add the empty structure that indicates the end of the array. > > Fixes: bd6f48546b9c ("net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs") > Signed-off-by: Marc Zyngier <maz@kernel.org> > Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> > Cc: stable@vger.kernel.org Please do not CC: stable@vger.kernel.org for networking changes as per netdev-FAQ Applied and queued up for -stable, thanks.
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c index 0e2fa14f14237..a3934ca6a043b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c @@ -119,6 +119,7 @@ static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) { .div = 5, .val = 5, }, { .div = 6, .val = 6, }, { .div = 7, .val = 7, }, + { /* end of array */ } }; clk_configs = devm_kzalloc(dev, sizeof(*clk_configs), GFP_KERNEL);