On Tue, Feb 11, 2020 at 11:39:31AM +0100, Michał Mirosław wrote:
> On Tue, Feb 11, 2020 at 12:23:54PM +0300, Dan Carpenter wrote:
> > On Tue, Feb 11, 2020 at 09:46:54AM +0100, Michał Mirosław wrote:
> > > @@ -234,8 +234,8 @@ static void wfx_sdio_remove(struct sdio_func *func)
> > > struct wfx_sdi
On Tue, Feb 11, 2020 at 12:23:54PM +0300, Dan Carpenter wrote:
> On Tue, Feb 11, 2020 at 09:46:54AM +0100, Michał Mirosław wrote:
> > @@ -234,8 +234,8 @@ static void wfx_sdio_remove(struct sdio_func *func)
> > struct wfx_sdio_priv *bus = sdio_get_drvdata(func);
> >
> > wfx_release(bus->co
On Tue, Feb 11, 2020 at 09:46:54AM +0100, Michał Mirosław wrote:
> @@ -218,9 +218,9 @@ static int wfx_sdio_probe(struct sdio_func *func,
> return 0;
>
> err3:
> - wfx_free_common(bus->core);
> + wfx_sdio_irq_unsubscribe(bus);
> err2:
> - wfx_sdio_irq_unsubscribe(bus);
> +
Move interrupt request and free so to avoid following WARN on probe
and possible use-after-free on remove.
WARNING: CPU: 0 PID: 827 at drivers/staging/wfx/bus_spi.c:142
wfx_spi_irq_handler+0x5c/0x64 [wfx]
race condition in driver init/deinit
Cc: sta...@vger.kernel.org
Signed-off-by: Michał Miros