Re: [PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-21 Thread Matthew R. Ochs
> On Sep 21, 2015, at 7:25 AM, Tomas Henzl wrote: > On 16.9.2015 23:31, Matthew R. Ochs wrote: >> The workq can process work in parallel with a remove event, leading >> to a condition where the workq handler can access freed memory. >> >> To remedy, the workq should be

Re: [PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:31, Matthew R. Ochs wrote: > The workq can process work in parallel with a remove event, leading > to a condition where the workq handler can access freed memory. > > To remedy, the workq should be terminated prior to freeing memory. Move > the termination call earlier in remove

[PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-16 Thread Matthew R. Ochs
The workq can process work in parallel with a remove event, leading to a condition where the workq handler can access freed memory. To remedy, the workq should be terminated prior to freeing memory. Move the termination call earlier in remove and use cancel_work_sync() instead of flush_work() as

[PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-16 Thread Matthew R. Ochs
The workq can process work in parallel with a remove event, leading to a condition where the workq handler can access freed memory. To remedy, the workq should be terminated prior to freeing memory. Move the termination call earlier in remove and use cancel_work_sync() instead of flush_work() as