Re: use-after-free in Bluetooth: 6lowpan (was Re: KASAN: use-after-free Write in refcount_warn_saturate)

2020-07-08 Thread Ing. Josua Mayer
5 >> ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 > > The free and use-after-free are both via the same do_enable_set() path > which implies there are racing writes to the debugfs write handler. It > seems locking is missing for both listen_chan and enable_6lowpan. The > latter seems misused in is_bt_6lowpan(), which should likely just be > checking for chan->ops == &bt_6lowpan_chan_ops, I think? > > I have no way to actually test changes to this code... > I do have limited hardware for testing bluetooth 6lowpan connections, but am a little busy these weeks. So some time by the end of this month I should be able to at least verify if my use-case would be broken by a change, if somebody were to propose one ;) br Josua Mayer

[PATCH v2 2/4] net: mvmdio: allow up to four clocks to be specified for orion-mdio

2019-07-09 Thread josua
From: Josua Mayer Allow up to four clocks to be specified and enabled for the orion-mdio interface, which are required by the Armada 8k and defined in armada-cp110.dtsi. Fixes a hang in probing the mvmdio driver that was encountered on the Clearfog GT 8K with all drivers built as modules, but

[PATCH v2 4/4] net: mvmdio: defer probe of orion-mdio if a clock is not ready

2019-07-09 Thread josua
From: Josua Mayer Defer probing of the orion-mdio interface when getting a clock returns EPROBE_DEFER. This avoids locking up the Armada 8k SoC when mdio is used before all clocks have been enabled. Signed-off-by: Josua Mayer --- drivers/net/ethernet/marvell/mvmdio.c | 5 + 1 file changed

[PATCH v2 0/4] Fix hang of Armada 8040 SoC in orion-mdio

2019-07-09 Thread josua
From: Josua Mayer With a modular kernel as configured by Debian a hang was observed with the Armada 8040 SoC in the Clearfog GT and Macchiatobin boards. The 8040 SoC actually requires four clocks to be enabled for the mdio interface to function. All 4 clocks are already specified in armada

[PATCH v2 1/4] dt-bindings: allow up to four clocks for orion-mdio

2019-07-09 Thread josua
From: Josua Mayer Armada 8040 needs four clocks to be enabled for MDIO accesses to work. Update the binding to allow the extra clock to be specified. Cc: sta...@vger.kernel.org Fixes: 6d6a331f44a1 ("dt-bindings: allow up to three clocks for orion-mdio") Reviewed-by: Andrew Lunn Sig

[PATCH v2 3/4] net: mvmdio: print warning when orion-mdio has too many clocks

2019-07-09 Thread josua
From: Josua Mayer Print a warning when device tree specifies more than the maximum of four clocks supported by orion-mdio. Because reading from mdio can lock up the Armada 8k when a required clock is not initialized, it is important to notify the user when a specified clock is ignored. Signed

Re: [PATCH 3/4] net: mvmdio: print warning when orion-mdio has too many clocks

2019-07-06 Thread Josua Mayer
Hi Andrew, Am 06.07.19 um 18:09 schrieb Andrew Lunn: > On Sat, Jul 06, 2019 at 05:18:59PM +0200, jo...@solid-run.com wrote: >> From: Josua Mayer >> >> Print a warning when device tree specifies more than the maximum of four >> clocks supported by orion-mdio. Because re

[PATCH 3/4] net: mvmdio: print warning when orion-mdio has too many clocks

2019-07-06 Thread josua
From: Josua Mayer Print a warning when device tree specifies more than the maximum of four clocks supported by orion-mdio. Because reading from mdio can lock up the Armada 8k when a required clock is not initialized, it is important to notify the user when a specified clock is ignored. Signed

[PATCH 0/4] Fix hang of Armada 8040 SoC in orion-mdio

2019-07-06 Thread josua
From: Josua Mayer With a modular kernel as configured by Debian a hang was observed with the Armada 8040 SoC in the Clearfog GT and Macchiatobin boards. The 8040 SoC actually requires four clocks to be enabled for the mdio interface to function. All 4 clocks are already specified in armada

[PATCH 1/4] dt-bindings: allow up to four clocks for orion-mdio

2019-07-06 Thread josua
From: Josua Mayer Armada 8040 needs four clocks to be enabled for MDIO accesses to work. Update the binding to allow the extra clock to be specified. Cc: sta...@vger.kernel.org Fixes: 6d6a331f44a1 ("dt-bindings: allow up to three clocks for orion-mdio") Signed-off-by: J

[PATCH 2/4] net: mvmdio: allow up to four clocks to be specified for orion-mdio

2019-07-06 Thread josua
From: Josua Mayer Allow up to four clocks to be specified and enabled for the orion-mdio interface, which are required by the Armada 8k and defined in armada-cp110.dtsi. Fixes a hang in probing the mvmdio driver that was encountered on the Clearfog GT 8K with all drivers built as modules, but

[PATCH 4/4] net: mvmdio: defer probe of orion-mdio if a clock is not ready

2019-07-06 Thread josua
From: Josua Mayer Defer probing of the orion-mdio interface when enabling of either of the clocks defer probing. This avoids locking up the Armada 8k SoC when mdio is used before all clocks have been enabled. Signed-off-by: Josua Mayer --- drivers/net/ethernet/marvell/mvmdio.c | 5 + 1