Re: [PATCH v2] iio: proximity: as3935: fix use-after-free on device remove

From: Jonathan Cameron
Date: Sun Mar 10 2019 - 05:35:08 EST


On Sat, 9 Mar 2019 08:03:44 -0500
Sven Van Asbroeck <thesven73@xxxxxxxxx> wrote:

> On Sat, Mar 9, 2019 at 5:24 AM Tomasz Duszynski <tduszyns@xxxxxxxxx> wrote:
> >
> > What I meant is that delayed work initialization could stay where it was.
> > The reason you moved it is readability improvement so to me it is more
> > of a cleanup hence I suggested a separate patch. Up to you.
>
> Ah, I see what you mean now.
>
> I'm ok with splitting this up, but we should probably ask the maintainer
> (Jonathan) what he prefers, because he's the one who will have to take
> two small patches instead of one. And the second patch is a one-liner.

I don't mind either way (definitely a marginal case!) but as we have
this one and the alignment tidy up is trivial...

Applied with the alignment tweaked to the togreg branch of iio.git
and pushed out as testing.

I'm not taking this the fast way or proposing it for stable as
whilst the race is there, I don't think anyone has actually managed
to trigger it.

Thanks,

Jonathan