[PATCH] net: dsa: microchip: fix race condition

2020-10-27 Thread Christian Eggers
[ Upstream commit 8098bd69bc4e925070313b1b95d03510f4f24738 ] Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() (via phy_device_create()) and the queued work may be executed prior to the switch net devices being registered. In ksz_m

Re: [PATCH] net: dsa: microchip: fix race condition

2020-10-05 Thread Vladimir Oltean
Hi Christian, On Mon, Oct 05, 2020 at 06:08:29PM +0200, Christian Eggers wrote: > Between queuing the delayed work and finishing the setup of the dsa > ports, the process may sleep in request_module() and the queued work may > be executed prior the initialization of the DSA ports is finished. In

Re: [PATCH] net: dsa: microchip: fix race condition

2020-10-05 Thread Florian Fainelli
On 10/5/2020 9:08 AM, Christian Eggers wrote: Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() and the queued work may be executed prior the initialization of the DSA ports is finished. In ksz_mib_read_work(), a NULL dereferen

[PATCH] net: dsa: microchip: fix race condition

2020-10-05 Thread Christian Eggers
Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() and the queued work may be executed prior the initialization of the DSA ports is finished. In ksz_mib_read_work(), a NULL dereference will happen within netof_carrier_ok(dp->slave).