Re: [PATCH for-4.14.y 4/4] nvme_fc: fix ctrl create failures racing with workq items

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 10, 2018 at 02:59:49PM +0530, Amit Pundir wrote:
> From: James Smart <jsmart2021@xxxxxxxxx>
> 
> commit cf25809bec2c7df4b45df5b2196845d9a4a3c89b upstream.
> 
> If there are errors during initial controller create, the transport
> will teardown the partially initialized controller struct and free
> the ctlr memory.  Trouble is - most of those errors can occur due
> to asynchronous events happening such io timeouts and subsystem
> connectivity failures. Those failures invoke async workq items to
> reset the controller and attempt reconnect.  Those may be in progress
> as the main thread frees the ctrl memory, resulting in NULL ptr oops.
> 
> Prevent this from happening by having the main ctrl failure thread
> changing state to DELETING followed by synchronously cancelling any
> pending queued work item. The change of state will prevent the
> scheduling of resets or reconnect events.
> 
> Signed-off-by: James Smart <james.smart@xxxxxxxxxxxx>
> Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx>
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> Signed-off-by: Amit Pundir <amit.pundir@xxxxxxxxxx>
> ---
> Build tested on 4.14.74 for ARCH=arm/arm64 allmodconfig.

Now applied, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux